feat: add backup for server
This commit is contained in:
parent
20ee47caa2
commit
f7409e0537
14 changed files with 256 additions and 165 deletions
33
system/modules/cockpit.nix
Normal file
33
system/modules/cockpit.nix
Normal 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}";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue