nixos/restic: change type of timerConfig option to attrsOf unitOption

This is needed for correctly passing the option to "systemd.timer"
This commit is contained in:
LeOtaku
2019-01-23 21:29:02 +01:00
parent b3eaad9a27
commit 63ed962e4b
+6 -1
View File
@@ -1,6 +1,11 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib; 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 { options.services.restic.backups = mkOption {
description = '' description = ''
@@ -47,7 +52,7 @@ with lib;
}; };
timerConfig = mkOption { timerConfig = mkOption {
type = types.attrsOf types.str; type = types.attrsOf unitOption;
default = { default = {
OnCalendar = "daily"; OnCalendar = "daily";
}; };