summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorSilvan Mosberger <infinisil@icloud.com>2019-01-24 00:40:52 +0100
committerGitHub <noreply@github.com>2019-01-24 00:40:52 +0100
commit968eb6b3e0580e9ec63842c4e9597a102596a18c (patch)
tree66af77f1a0206e2ec1cfda978279aa07ec7b37ee /nixos
parent3bb9b102e5503e4064bf9b2841c9a668be244e78 (diff)
parent63ed962e4b6c37065e83721744128729633586e1 (diff)
downloadnixpkgs-968eb6b3e0580e9ec63842c4e9597a102596a18c.tar
nixpkgs-968eb6b3e0580e9ec63842c4e9597a102596a18c.tar.gz
nixpkgs-968eb6b3e0580e9ec63842c4e9597a102596a18c.tar.bz2
nixpkgs-968eb6b3e0580e9ec63842c4e9597a102596a18c.tar.lz
nixpkgs-968eb6b3e0580e9ec63842c4e9597a102596a18c.tar.xz
nixpkgs-968eb6b3e0580e9ec63842c4e9597a102596a18c.tar.zst
nixpkgs-968eb6b3e0580e9ec63842c4e9597a102596a18c.zip
Merge pull request #54514 from LeOtaku/fix/restic-timer-config
nixos/restic: change type of timerConfig option
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/backup/restic.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/nixos/modules/services/backup/restic.nix b/nixos/modules/services/backup/restic.nix
index 6ece5a9b5ad..7e8e91e4b9c 100644
--- a/nixos/modules/services/backup/restic.nix
+++ b/nixos/modules/services/backup/restic.nix
@@ -1,6 +1,11 @@
 { config, lib, pkgs, ... }:
 
 with lib;
+
+let
+  # Type for a valid systemd unit option. Needed for correctly passing "timerConfig" to "systemd.timers"
+  unitOption = (import ../../system/boot/systemd-unit-options.nix { inherit config lib; }).unitOption;
+in
 {
   options.services.restic.backups = mkOption {
     description = ''
@@ -47,7 +52,7 @@ with lib;
         };
 
         timerConfig = mkOption {
-          type = types.attrsOf types.str;
+          type = types.attrsOf unitOption;
           default = {
             OnCalendar = "daily";
           };