Added lots of sops
This commit is contained in:
parent
84bec55415
commit
01c04cd91c
25 changed files with 532 additions and 183 deletions
46
moduler/services/headscale/default.nix
Normal file
46
moduler/services/headscale/default.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
{
|
||||
options = {
|
||||
headscale = {
|
||||
enable = mkEnableOption "enables headscale";
|
||||
domain = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "headscale.wastring.com";
|
||||
description = "The domain that headscale is served on.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf config.headscale.enable {
|
||||
services = {
|
||||
headscale = {
|
||||
enable = true;
|
||||
address = "0.0.0.0";
|
||||
port = 8080;
|
||||
server_url = "https://${domain}";
|
||||
dns = {
|
||||
baseDomain = "example.com";
|
||||
};
|
||||
settings = {
|
||||
logtail.enabled = false;
|
||||
};
|
||||
};
|
||||
|
||||
nginx.virtualHosts.${domain} = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:${toString config.services.headscale.port}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue