Skip to content

Commit

Permalink
Added option and description for nix store auto-optimisation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Steinpass committed Mar 20, 2017
1 parent 659ea1e commit 68c6d90
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions nixos/modules/services/misc/nix-daemon.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = *
''}
Expand Down Expand Up @@ -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;
Expand Down

1 comment on commit 68c6d90

@nixos-discourse
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/should-i-enable-nix-autooptimisestore-on-my-laptop/12217/1

Please sign in to comment.