Compare commits
4 commits
cd802ab3a6
...
32b291be20
| Author | SHA1 | Date | |
|---|---|---|---|
| 32b291be20 | |||
| 3b5c8735be | |||
| e531e6cb68 | |||
| e15aa9ba44 |
4 changed files with 47 additions and 2 deletions
41
roles/server/adguard.nix
Normal file
41
roles/server/adguard.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{lib, ...}: let
|
||||
domain = "adguard.everest.tailscale";
|
||||
port = 3001;
|
||||
in {
|
||||
services = {
|
||||
adguardhome = {
|
||||
enable = true;
|
||||
host = "127.0.0.1";
|
||||
port = port;
|
||||
settings = {
|
||||
dns = {
|
||||
bind_hosts = [
|
||||
"192.168.0.160"
|
||||
"100.100.0.1"
|
||||
];
|
||||
bootstrap_dns = ["9.9.9.9"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
headscale.settings.dns_config = {
|
||||
nameservers = lib.mkForce ["100.100.0.1"];
|
||||
extra_records = [
|
||||
{
|
||||
name = domain;
|
||||
type = "A";
|
||||
value = "100.100.0.1";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
caddy.virtualHosts.adguardhome = {
|
||||
hostName = domain;
|
||||
extraConfig = ''
|
||||
import tailscale
|
||||
reverse_proxy 127.0.0.1:${builtins.toString port}
|
||||
'';
|
||||
};
|
||||
};
|
||||
programs.rust-motd.settings.service_status."AdGuard Home" = "adguardhome";
|
||||
}
|
||||
|
|
@ -15,5 +15,6 @@
|
|||
./caddy.nix
|
||||
./rust_motd.nix
|
||||
./minecraft.nix
|
||||
./adguard.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,4 +21,5 @@
|
|||
'';
|
||||
};
|
||||
};
|
||||
programs.rust-motd.settings.service_status.Headscale = "headscale";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
enable = true;
|
||||
key = config.age.secrets.syncthingKey.path;
|
||||
cert = config.age.secrets.syncthingCert.path;
|
||||
guiAddress = "0.0.0.0:8384";
|
||||
guiAddress = "127.0.0.1:8384";
|
||||
settings.folders = {
|
||||
"passwords" = {
|
||||
path = "${config.services.syncthing.dataDir}/passwords";
|
||||
|
|
@ -53,7 +53,9 @@
|
|||
hostName = "sync.everest.tailscale";
|
||||
extraConfig = ''
|
||||
import tailscale
|
||||
reverse_proxy localhost:8384
|
||||
reverse_proxy localhost:8384 {
|
||||
header_up Host {upstream_hostport}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue