reconfigure photon

This commit is contained in:
Dennis Wuitz
2023-12-27 10:03:13 +01:00
parent b6c85d89dd
commit 78e428f3f3
10 changed files with 325 additions and 115 deletions

View File

@ -9,22 +9,22 @@ in
paths = lib.mkOption {
type = with lib.types; listOf str;
default = [];
default = [ ];
description = "Extra paths to include in backup.";
};
exclude = lib.mkOption {
type = with lib.types; listOf str;
default = [];
default = [ ];
description = "Extra paths to exclude in backup.";
};
};
config = {
assertions = [ {
assertions = [{
assertion = cfg.paths != [ ] -> cfg.enable;
message = "Configuring backup services.backup.paths without enabling services.backup.enable is useless!";
} ];
}];
services = {
postgresqlBackup = {
@ -54,9 +54,9 @@ in
"/etc/subuid"
"/var/lib/nixos/"
] ++ cfg.paths
++ lib.optional config.services.postgresql.enable "/var/backup/postgresql/"
++ lib.optional (config.security.acme.certs != {}) "/var/lib/acme/"
++ lib.optional config.security.dhparams.enable "/var/lib/dhparams/";
++ lib.optional config.services.postgresql.enable "/var/backup/postgresql/"
++ lib.optional (config.security.acme.certs != { }) "/var/lib/acme/"
++ lib.optional config.security.dhparams.enable "/var/lib/dhparams/";
pruneOpts = [
"--group-by host"
"--keep-daily 7"
@ -119,4 +119,4 @@ in
};
};
};
}
}