diff options
| author | Adam C. Stephens <2071575+adamcstephens@users.noreply.github.com> | 2024-04-10 13:48:22 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-10 13:48:22 -0400 |
| commit | e8ff41fa8533e67e8448b9896f16c9ac77ee3289 (patch) | |
| tree | a11a3a5817e9a4886c90b7aa49dd91d7618d4af6 | |
| parent | Merge pull request #250009 from gepbird/update-zsh-syntax-highlighting (diff) | |
| parent | nix-optimise: only create timer unit if needed (diff) | |
| download | nixpkgs-e8ff41fa8533e67e8448b9896f16c9ac77ee3289.tar.gz | |
Merge pull request #285041 from r-vdp/nix-optimise-fix-timer
nix-optimise: only create timer unit if needed
| -rw-r--r-- | nixos/modules/services/misc/nix-optimise.nix | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/nixos/modules/services/misc/nix-optimise.nix b/nixos/modules/services/misc/nix-optimise.nix index 0398229a13da..514855abaee4 100644 --- a/nixos/modules/services/misc/nix-optimise.nix +++ b/nixos/modules/services/misc/nix-optimise.nix @@ -42,9 +42,11 @@ in startAt = lib.optionals cfg.automatic cfg.dates; }; - timers.nix-optimise.timerConfig = { - Persistent = true; - RandomizedDelaySec = 1800; + timers.nix-optimise = lib.mkIf cfg.automatic { + timerConfig = { + Persistent = true; + RandomizedDelaySec = 1800; + }; }; }; }; |
