mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
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
This commit is contained in:
parent
20b993ef2c
commit
897834f015
2 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue