From 63ed962e4b6c37065e83721744128729633586e1 Mon Sep 17 00:00:00 2001 From: LeOtaku Date: Wed, 23 Jan 2019 21:29:02 +0100 Subject: nixos/restic: change type of timerConfig option to attrsOf unitOption This is needed for correctly passing the option to "systemd.timer" --- nixos/modules/services/backup/restic.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'nixos/modules/services/backup') 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"; }; -- cgit 1.4.1