diff options
author | Franck Cuny <franck@fcuny.net> | 2022-04-24 13:46:18 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-04-24 13:46:18 -0700 |
commit | 94f8172f0f5a6d5568b5204d88c5d45e77a20f69 (patch) | |
tree | a4a11722232dc2e015e2c32eeebf12be4fd5f53f /modules/services | |
parent | tmux: start windows at 1 (diff) | |
download | world-94f8172f0f5a6d5568b5204d88c5d45e77a20f69.tar.gz |
backups: do backups for the laptop
From the laptop I only backup /home/fcuny, as the rest should be straightforward to rebuild with nix. I run that backup as my own user, since I need my ssh key to use the remote repository (which is on the NAS). I also need a new secret for it (I might have been able to use `pass' for this, but well, that's easy enough). For the NAS, I update the list of directories to backup to include home, this will be on the systems backup.
Diffstat (limited to 'modules/services')
-rw-r--r-- | modules/services/backup/default.nix | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/services/backup/default.nix b/modules/services/backup/default.nix index aefd383..2db1aa8 100644 --- a/modules/services/backup/default.nix +++ b/modules/services/backup/default.nix @@ -67,6 +67,15 @@ in { When to run the backup. See man systemd.timer for details. ''; }; + + user = mkOption { + type = types.str; + default = "root"; + description = '' + As which user the backup should run. + ''; + example = "postgresql"; + }; }; config = lib.mkIf cfg.enable { @@ -76,7 +85,7 @@ in { extraBackupArgs = [ "--verbose=2" ]; # Take care of creating the repository if it doesn't exist initialize = true; - inherit (cfg) passwordFile pruneOpts timerConfig repository; + inherit (cfg) passwordFile pruneOpts timerConfig repository user; }; }; } |