tsuki: add headscale
This commit is contained in:
parent
c2f8fa0efb
commit
47d8aa7899
|
@ -7,6 +7,7 @@
|
|||
# ./services/calibre.nix
|
||||
./services/gitea
|
||||
./services/grafana
|
||||
./services/headscale.nix
|
||||
./services/hydra.nix
|
||||
# ./services/jitsi.nix
|
||||
./services/jupyter.nix
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
{ pkgs, secrets, config, ... }:
|
||||
{
|
||||
services.headscale = {
|
||||
enable = true;
|
||||
|
||||
# TODO: make PR
|
||||
# dataDir = "${config.machineVars.dataDrives.default}/var/headscale";
|
||||
|
||||
serverUrl = "https://vpn.nani.wtf";
|
||||
port = secrets.ports.headscale;
|
||||
|
||||
database = {
|
||||
type = "postgres";
|
||||
user = "headscale";
|
||||
name = "headscale";
|
||||
host = "localhost";
|
||||
port = secrets.ports.postgres;
|
||||
passwordFile = "${config.machineVars.dataDrives.default}/keys/postgres/headscale";
|
||||
};
|
||||
|
||||
dns = {
|
||||
magicDns = true;
|
||||
nameservers = [
|
||||
"1.1.1.1"
|
||||
];
|
||||
};
|
||||
|
||||
settings = {
|
||||
log.level = "warn";
|
||||
ip_prefixes = [ "10.8.0.0/24" ];
|
||||
};
|
||||
};
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = [ "headscale" ];
|
||||
ensureUsers = [
|
||||
(rec {
|
||||
name = "headscale";
|
||||
ensurePermissions = {
|
||||
"DATABASE \"${name}\"" = "ALL PRIVILEGES";
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ headscale ];
|
||||
|
||||
services.tailscale.enable = true;
|
||||
|
||||
networking.firewall.checkReversePath = "loose";
|
||||
}
|
|
@ -109,7 +109,7 @@
|
|||
})
|
||||
(proxy ["dyn"] "http://localhost:${s ports.minecraft.dynmap}" {})
|
||||
(proxy ["osu"] "http://localhost:${s ports.osuchan}" {})
|
||||
# (host ["vpn"] "" {})
|
||||
(proxy ["vpn"] "http://localhost:${s ports.headscale}" {})
|
||||
(proxy ["hydra"] "http://localhost:${s ports.hydra}" {})
|
||||
] ++ (let
|
||||
stickerpickers = pkgs.callPackage ../matrix/maunium-stickerpicker.nix {
|
||||
|
|
Loading…
Reference in New Issue