nixos: services: backup: add essential files
ci/woodpecker/push/check Pipeline was successful Details

This commit is contained in:
Bruno BELANYI 2024-02-12 14:18:44 +00:00
parent 0bb2be6b87
commit c9969775da
1 changed files with 10 additions and 0 deletions

View File

@ -89,6 +89,16 @@ in
};
config = lib.mkIf cfg.enable {
# Essential files which should always be backed up
my.services.backup.paths = lib.flatten [
# Should be unique to a given host, used by some software (e.g: ZFS)
"/etc/machine-id"
# Contains the UID/GID map, and other useful state
"/var/lib/nixos"
# SSH host keys (and public keys for convenience)
(builtins.map (key: [ key.path "${key.path}.pub" ]) config.services.openssh.hostKeys)
];
services.restic.backups.backblaze = {
# Take care of included and excluded files
paths = cfg.paths;