nixos/nix-{gc,optimise}: do not start when switching
Co-authored-by: Sizhe Zhao <prc.zhao@outlook.com>
This commit is contained in:
@@ -69,6 +69,8 @@ in
|
||||
unitConfig.ConditionPathIsReadWrite = "/nix/var/nix/daemon-socket";
|
||||
serviceConfig.ExecStart = "${config.nix.package}/bin/nix-store --optimise";
|
||||
startAt = lib.optionals cfg.automatic cfg.dates;
|
||||
# do not start and delay when switching
|
||||
restartIfChanged = false;
|
||||
};
|
||||
|
||||
timers.nix-optimise = lib.mkIf cfg.automatic {
|
||||
|
||||
Reference in New Issue
Block a user