summary refs log tree commit diff
path: root/nixos/modules/services/misc/nix-optimise.nix
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2018-10-10 20:57:10 +0800
committerGitHub <noreply@github.com>2018-10-10 20:57:10 +0800
commit98649aea0f9b9b047c3937ed2bc05908b0e226a5 (patch)
treed6ae66b61d862abbe44c236b744d3800c04d3c2b /nixos/modules/services/misc/nix-optimise.nix
parentd3b79965df495f09d37fa5216a7dd271d000589b (diff)
parentc3c695183cde665872fa53f4c592b47e3976c379 (diff)
downloadnixpkgs-98649aea0f9b9b047c3937ed2bc05908b0e226a5.tar
nixpkgs-98649aea0f9b9b047c3937ed2bc05908b0e226a5.tar.gz
nixpkgs-98649aea0f9b9b047c3937ed2bc05908b0e226a5.tar.bz2
nixpkgs-98649aea0f9b9b047c3937ed2bc05908b0e226a5.tar.lz
nixpkgs-98649aea0f9b9b047c3937ed2bc05908b0e226a5.tar.xz
nixpkgs-98649aea0f9b9b047c3937ed2bc05908b0e226a5.tar.zst
nixpkgs-98649aea0f9b9b047c3937ed2bc05908b0e226a5.zip
Merge pull request #48098 from peterhoeg/f/opti
nix-optimise: do not run in container
Diffstat (limited to 'nixos/modules/services/misc/nix-optimise.nix')
-rw-r--r--nixos/modules/services/misc/nix-optimise.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/modules/services/misc/nix-optimise.nix b/nixos/modules/services/misc/nix-optimise.nix
index 6f75e4dd03e..416529f690e 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;
       };