git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/restic: change type of timerConfig option to attrsOf unitOption

This is needed for correctly passing the option to "systemd.timer"

commit63ed962e4b6c37065e83721744128729633586e1 authorLeOtaku <leo.gaskin@brg-feldkirchen.at> dateWed 23 Jan 2019, 21:29 (8 years ago) parentb3eaad9
1 file changed+6−1
nixos/modules/services/backup/restic.nix+6−1
nixos/modules/services/backup/restic.nix+6−1
@@ -1,6 +1,11 @@
11{ config, lib, pkgs, ... }:
22
33with lib;
4+
5+let
6+ # Type for a valid systemd unit option. Needed for correctly passing "timerConfig" to "systemd.timers"
7+ unitOption = (import ../../system/boot/systemd-unit-options.nix { inherit config lib; }).unitOption;
8+in
49{
510 options.services.restic.backups = mkOption {
611 description = ''
@@ -47,7 +52,7 @@ with lib;
4752 };
4853
4954 timerConfig = mkOption {
50− type = types.attrsOf types.str;
55+ type = types.attrsOf unitOption;
5156 default = {
5257 OnCalendar = "daily";
5358 };