Headscale, initialization
This commit is contained in:
parent
148cd416e9
commit
12ea4b5a87
2 changed files with 36 additions and 0 deletions
|
|
@ -36,6 +36,11 @@ in {
|
||||||
reverse_proxy :${builtins.toString config.forgejo.server.port}
|
reverse_proxy :${builtins.toString config.forgejo.server.port}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
"ginko.woach.me" = {
|
||||||
|
extraConfig = ''
|
||||||
|
reverse_proxy :${builtins.toString config.headscale.server.port}
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -56,6 +61,11 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
headscale = {
|
||||||
|
enable = true;
|
||||||
|
server.domain = "ginko.woach.me";
|
||||||
|
};
|
||||||
|
|
||||||
postgres.enable = true;
|
postgres.enable = true;
|
||||||
|
|
||||||
shell.enabledShells = [ "fish" ];
|
shell.enabledShells = [ "fish" ];
|
||||||
|
|
|
||||||
26
nixosModules/services/headscale/service.nix
Normal file
26
nixosModules/services/headscale/service.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
options.headscale = {
|
||||||
|
enable = lib.mkEnableOption "Enable headscale";
|
||||||
|
server = {
|
||||||
|
port = lib.mkOption { default = 7204; };
|
||||||
|
domain = lib.mkOption { type = lib.types.str; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.headscale.enable {
|
||||||
|
networking.firewall.allowedUDPPorts = [ 3478 ];
|
||||||
|
services.headscale = {
|
||||||
|
enable = true;
|
||||||
|
port = config.headscale.server.port;
|
||||||
|
settings = {
|
||||||
|
server_url = "https://${config.headscale.server.domain}";
|
||||||
|
dns = {
|
||||||
|
base_domain = "connect.claris";
|
||||||
|
override_local_dns = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue