From c3c695183cde665872fa53f4c592b47e3976c379 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Fri, 27 Apr 2018 15:09:48 +0800 Subject: nix-optimise: do not run in container --- nixos/modules/services/misc/nix-optimise.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'nixos') diff --git a/nixos/modules/services/misc/nix-optimise.nix b/nixos/modules/services/misc/nix-optimise.nix index 295e7fb0ba03..f3c5d3e81db4 100644 --- a/nixos/modules/services/misc/nix-optimise.nix +++ b/nixos/modules/services/misc/nix-optimise.nix @@ -40,6 +40,8 @@ in systemd.services.nix-optimise = { description = "Nix Store Optimiser"; + # No point running it inside a nixos-container. It should be on the host instead. + unitConfig.ConditionVirtualization = "!container"; serviceConfig.ExecStart = "${config.nix.package}/bin/nix-store --optimise"; startAt = optionals cfg.automatic cfg.dates; }; -- cgit 1.4.1