about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeOtaku <leo.gaskin@brg-feldkirchen.at>2019-01-23 21:29:02 +0100
committerLeOtaku <leo.gaskin@brg-feldkirchen.at>2019-01-23 21:29:02 +0100
commit63ed962e4b6c37065e83721744128729633586e1 (patch)
tree975f00bf708cd2d7b116f70033c06f1f0ddf9e11
parentb3eaad9a27534052196aad91ab7d1c56ee7bd66c (diff)
downloadnixlib-63ed962e4b6c37065e83721744128729633586e1.tar
nixlib-63ed962e4b6c37065e83721744128729633586e1.tar.gz
nixlib-63ed962e4b6c37065e83721744128729633586e1.tar.bz2
nixlib-63ed962e4b6c37065e83721744128729633586e1.tar.lz
nixlib-63ed962e4b6c37065e83721744128729633586e1.tar.xz
nixlib-63ed962e4b6c37065e83721744128729633586e1.tar.zst
nixlib-63ed962e4b6c37065e83721744128729633586e1.zip
nixos/restic: change type of timerConfig option to attrsOf unitOption
This is needed for correctly passing the option to "systemd.timer"
-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 6ece5a9b5ad6..7e8e91e4b9c3 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";
           };