From 645ff13a4be67718b624c5b15f316922399cc3dd Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Sun, 23 Oct 2016 17:24:17 +0200 Subject: [PATCH 1/2] nixos autoUpgrade: fix use of startAt `startAt = ""` as in `startAt = optionalString false ...` results in an invalid timer unit (due to "" being promoted to a singleton list and not filtered out). Ref: c9941c4b5ef7acc1cb8d734acb383410d99c01ba --- nixos/modules/installer/tools/auto-upgrade.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/installer/tools/auto-upgrade.nix b/nixos/modules/installer/tools/auto-upgrade.nix index b21b80c666a..dfb43d1a1db 100644 --- a/nixos/modules/installer/tools/auto-upgrade.nix +++ b/nixos/modules/installer/tools/auto-upgrade.nix @@ -84,7 +84,7 @@ let cfg = config.system.autoUpgrade; in ${config.system.build.nixos-rebuild}/bin/nixos-rebuild switch ${toString cfg.flags} ''; - startAt = optionalString cfg.enable cfg.dates; + startAt = optional cfg.enable cfg.dates; }; }; From 4c41c412a0c6353e6a49b484783b4c925064718c Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Sun, 23 Oct 2016 17:26:18 +0200 Subject: [PATCH 2/2] nix gc service: fix use of startAt `startAt = ""` as in `startAt = optionalString false ...` results in an invalid timer unit (due to "" being promoted to a singleton list and not filtered out). Ref: c9941c4b5ef7acc1cb8d734acb383410d99c01ba --- nixos/modules/services/misc/nix-gc.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/nix-gc.nix b/nixos/modules/services/misc/nix-gc.nix index 5c13da6e83d..304168c65b0 100644 --- a/nixos/modules/services/misc/nix-gc.nix +++ b/nixos/modules/services/misc/nix-gc.nix @@ -53,7 +53,7 @@ in systemd.services.nix-gc = { description = "Nix Garbage Collector"; script = "exec ${config.nix.package.out}/bin/nix-collect-garbage ${cfg.options}"; - startAt = optionalString cfg.automatic cfg.dates; + startAt = optional cfg.automatic cfg.dates; }; };