diff options
author | Peter Hoeg <peter@hoeg.com> | 2019-07-01 18:05:57 +0800 |
---|---|---|
committer | Peter Hoeg <peter@hoeg.com> | 2019-07-03 09:37:14 +0800 |
commit | 897834f0159fd3180430cfa88ebd70a772238ceb (patch) | |
tree | 02a856014a4f143431c3fa49bc7b6c76510d5b92 /nixos/modules/virtualisation | |
parent | 20b993ef2c9e818a636582ade9597f71a485209d (diff) | |
download | nixpkgs-897834f0159fd3180430cfa88ebd70a772238ceb.tar nixpkgs-897834f0159fd3180430cfa88ebd70a772238ceb.tar.gz nixpkgs-897834f0159fd3180430cfa88ebd70a772238ceb.tar.bz2 nixpkgs-897834f0159fd3180430cfa88ebd70a772238ceb.tar.lz nixpkgs-897834f0159fd3180430cfa88ebd70a772238ceb.tar.xz nixpkgs-897834f0159fd3180430cfa88ebd70a772238ceb.tar.zst nixpkgs-897834f0159fd3180430cfa88ebd70a772238ceb.zip |
nixos/nix-optimise: be smarter about when we run the store optimiser
We might be inside a NixOS container on a non-NixOS host, so instead of not running at all inside a container, check if the nix-daemon socket is writable as it will tell us if the store is managed from here or outside. Fixes #63578
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r-- | nixos/modules/virtualisation/container-config.nix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/virtualisation/container-config.nix b/nixos/modules/virtualisation/container-config.nix index 604fb8a7593..f7a37d8c9f3 100644 --- a/nixos/modules/virtualisation/container-config.nix +++ b/nixos/modules/virtualisation/container-config.nix @@ -7,6 +7,7 @@ with lib; config = mkIf config.boot.isContainer { # Disable some features that are not useful in a container. + nix.optimise.automatic = mkDefault false; # the store is host managed services.udisks2.enable = mkDefault false; powerManagement.enable = mkDefault false; |