feat: add backup for server

This commit is contained in:
danny 2025-09-28 12:37:26 +08:00
parent 20ee47caa2
commit f7409e0537
14 changed files with 256 additions and 165 deletions

View file

@ -0,0 +1,33 @@
{
enableNginx ? false,
domain,
}:
{
lib,
config,
...
}:
let
inherit (lib) mkIf;
in
{
services.cockpit = {
enable = true;
openFirewall = true;
allowed-origins = [
];
settings = {
WebService = {
ProtocolHeader = "X-Forwarded-Proto";
ForwardedForHeader = "X-Forwarded-For";
LoginTo = false;
};
};
};
services.nginx.virtualHosts."${domain}" = mkIf enableNginx {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://localhost:${toString config.services.cockpit.port}";
};
}