From 5fe03fb9231d6ef3adbb38001884bb06aa2b0dd0 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Wed, 2 Dec 2020 22:17:50 +0100 Subject: [PATCH] nix: Enable store auto optimisation --- modules/base.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/base.nix b/modules/base.nix index 2e5bf99..9834f8f 100644 --- a/modules/base.nix +++ b/modules/base.nix @@ -39,8 +39,13 @@ # NixOS state version (see https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion) system.stateVersion = "20.03"; - # Make sudoers trusted nix users - nix.trustedUsers = [ "@wheel" ]; + nix = { + # Make sudoers trusted nix users + trustedUsers = [ "@wheel" ]; + + # On-the-fly optimisation of nix store + autoOptimiseStore = true; + }; nixpkgs.config = { # Explicitly allow unfree packages (rule of thumb: assets ok, code not ok)