Headscale, initialization
This commit is contained in:
parent
385eab27ba
commit
717b6e5c8e
2 changed files with 36 additions and 0 deletions
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