nixos: services: backup: add essential files
All checks were successful
ci/woodpecker/push/check Pipeline was successful
All checks were successful
ci/woodpecker/push/check Pipeline was successful
This commit is contained in:
parent
0bb2be6b87
commit
c9969775da
|
@ -89,6 +89,16 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
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 = {
|
services.restic.backups.backblaze = {
|
||||||
# Take care of included and excluded files
|
# Take care of included and excluded files
|
||||||
paths = cfg.paths;
|
paths = cfg.paths;
|
||||||
|
|
Loading…
Reference in a new issue