Automated dev commit

This commit is contained in:
Oliver Davies 2025-04-30 20:15:57 +01:00
parent 01900e4f65
commit 8d373c9b8c
3 changed files with 21 additions and 9 deletions

View file

@ -24,7 +24,11 @@
paperless.enable = true; paperless.enable = true;
uptime-kuma.enable = true; uptime-kuma.enable = true;
vaultwarden.enable = true; vaultwarden = {
enable = true;
cloudflared.tunnelId = "41feb37d-a0f5-4c21-80c8-36ab63ec3b17";
};
}; };
}; };
} }

View file

@ -5,4 +5,8 @@
./uptime-kuma.nix ./uptime-kuma.nix
./vaultwarden.nix ./vaultwarden.nix
]; ];
services = {
tailscale.enable = true;
};
} }

View file

@ -21,6 +21,11 @@ in
type = types.str; type = types.str;
}; };
cloudflared.tunnelId = mkOption {
example = "00000000-0000-0000-0000-000000000000";
type = types.str;
};
homepage.name = mkOption { homepage.name = mkOption {
default = "Vaultwarden"; default = "Vaultwarden";
type = types.str; type = types.str;
@ -49,19 +54,18 @@ in
config = { config = {
DOMAIN = "https://${cfg.url}"; DOMAIN = "https://${cfg.url}";
ROCKET_ADDRESS = "127.0.0.1";
ROCKET_PORT = 8222; ROCKET_PORT = 8222;
SIGNUPS_ALLOWED = false; SIGNUPS_ALLOWED = false;
}; };
}; };
nginx.virtualHosts.${cfg.url} = { cloudflared.tunnels.${cfg.cloudflared.tunnelId} = {
forceSSL = true; credentialsFile = config.age.secrets.cloudflared.path;
useACMEHost = homelab.baseDomain; default = "http_status:404";
ingress."${cfg.url}".service = "http://${config.services.${service}.config.ROCKET_ADDRESS}:${
locations."/" = { toString config.services.${service}.config.ROCKET_PORT
proxyPass = "http://localhost:${toString config.services.${service}.config.ROCKET_PORT}"; }";
recommendedProxySettings = true;
};
}; };
}; };
}; };