diff options
author | Philipp Steinpass <philipp@xndr.de> | 2017-03-20 19:06:16 +0100 |
---|---|---|
committer | Philipp Steinpass <philipp@xndr.de> | 2017-03-20 19:09:19 +0100 |
commit | 68c6d90417c5fc0d75c140e5e51e4f026cd6edff (patch) | |
tree | a4399a56f3f67dc8b97240d3e0b2dd06b3363e96 /nixos/modules/services/misc/nix-daemon.nix | |
parent | 659ea1e24a9807c4fdfc2c307e740e0de7481b91 (diff) | |
download | nixpkgs-68c6d90417c5fc0d75c140e5e51e4f026cd6edff.tar nixpkgs-68c6d90417c5fc0d75c140e5e51e4f026cd6edff.tar.gz nixpkgs-68c6d90417c5fc0d75c140e5e51e4f026cd6edff.tar.bz2 nixpkgs-68c6d90417c5fc0d75c140e5e51e4f026cd6edff.tar.lz nixpkgs-68c6d90417c5fc0d75c140e5e51e4f026cd6edff.tar.xz nixpkgs-68c6d90417c5fc0d75c140e5e51e4f026cd6edff.tar.zst nixpkgs-68c6d90417c5fc0d75c140e5e51e4f026cd6edff.zip |
Added option and description for nix store auto-optimisation.
Diffstat (limited to 'nixos/modules/services/misc/nix-daemon.nix')
-rw-r--r-- | nixos/modules/services/misc/nix-daemon.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 5088c4e6069..fed646aadac 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -46,6 +46,7 @@ let binary-caches = ${toString cfg.binaryCaches} trusted-binary-caches = ${toString cfg.trustedBinaryCaches} binary-cache-public-keys = ${toString cfg.binaryCachePublicKeys} + auto-optimise-store = ${toString cfg.autoOptimiseStore} ${optionalString cfg.requireSignedBinaryCaches '' signed-binary-caches = * ''} @@ -86,6 +87,18 @@ in ''; }; + autoOptimiseStore = mkOption { + type = types.bool; + default = false; + example = true; + description = '' + If set to true, Nix automatically detects files in the store that have + identical contents, and replaces them with hard links to a single copy. + This saves disk space. If set to false (the default), you can still run + nix-store --optimise to get rid of duplicate files. + ''; + }; + buildCores = mkOption { type = types.int; default = 1; |