From 6a5cb9b7544168e7136ab2dbd833c9fc63020db7 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 10 Apr 2022 14:44:33 -0700 Subject: secrets: move all the secrets under module/ Refactor a bit the configuration, which should simplify the management and usage of secrets from now on. --- modules/services/backup/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'modules/services/backup') diff --git a/modules/services/backup/default.nix b/modules/services/backup/default.nix index 52378d3..f74b5f9 100644 --- a/modules/services/backup/default.nix +++ b/modules/services/backup/default.nix @@ -11,7 +11,7 @@ in { }; passwordFile = mkOption { - type = types.str; + type = types.path; example = "/var/lib/restic/password.txt"; description = "Read the repository's password from this path"; }; @@ -70,11 +70,10 @@ in { }; config = lib.mkIf cfg.enable { - services.restic.backups = { + services.restic.backups.system = { # Take care of included and excluded files paths = cfg.paths; - extraBackupArgs = [ "--verbose=2" ] - ++ lib.optional (builtins.length cfg.exclude != 0) excludeArg; + extraBackupArgs = [ "--verbose=2" ]; # Take care of creating the repository if it doesn't exist initialize = true; inherit (cfg) passwordFile pruneOpts timerConfig repository; -- cgit 1.4.1