diff options
author | Felix Buehler <account@buehler.rocks> | 2023-06-25 11:47:43 +0200 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-06-25 09:11:40 -0300 |
commit | 933a41a73fe2174b90cabb7d671ee2cc5658701a (patch) | |
tree | 1f8228d1369ab51c644a47ab269fb9c638553752 /nixos/modules/services/backup | |
parent | 175e9d1f00c41b49606e4eacbc1bfe396641e90f (diff) |
treewide: use optional instead of 'then []'
Diffstat (limited to 'nixos/modules/services/backup')
-rw-r--r-- | nixos/modules/services/backup/restic.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/backup/restic.nix b/nixos/modules/services/backup/restic.nix index 3a951f7cbc834..1620770e5b564 100644 --- a/nixos/modules/services/backup/restic.nix +++ b/nixos/modules/services/backup/restic.nix @@ -298,7 +298,7 @@ in let extraOptions = concatMapStrings (arg: " -o ${arg}") backup.extraOptions; resticCmd = "${backup.package}/bin/restic${extraOptions}"; - excludeFlags = if (backup.exclude != []) then ["--exclude-file=${pkgs.writeText "exclude-patterns" (concatStringsSep "\n" backup.exclude)}"] else []; + excludeFlags = optional (backup.exclude != []) "--exclude-file=${pkgs.writeText "exclude-patterns" (concatStringsSep "\n" backup.exclude)}"; filesFromTmpFile = "/run/restic-backups-${name}/includes"; backupPaths = if (backup.dynamicFilesFrom == null) |