Set registry, disable sandbox + autoOptimise

Sandbox and auto-optimizing make builds unnecessarily slower. 'hey gc'
will optimise the store anyway.
This commit is contained in:
Henrik Lissner 2020-10-17 16:35:04 -04:00
parent c172f7cef3
commit 40005d0e88
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 5 additions and 3 deletions

View file

@ -63,6 +63,7 @@ function main {
if [[ $EUID == 0 ]]; then
echo "Cleaning up your system..."
_do sudo nix-collect-garbage ${@:--d}
_do nix-store --optimise
# nix-collect-garbage is a Nix tool, not a NixOS tool. It won't delete old
# boot entries until you do a nixos-rebuild (which means we'll always have
# 2 boot entries at any time). Instead, we properly delete them by
@ -73,7 +74,6 @@ function main {
echo "Cleaning up your user profile..."
_do nix-collect-garbage ${@:--d}
fi
_do nix-store --optimise
}
###

View file

@ -88,8 +88,10 @@
binaryCachePublicKeys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
autoOptimiseStore = true;
useSandbox = true;
registry = {
nixos.flake = nixos;
nixpkgs.flake = nixos-unstable;
};
};
system.configurationRevision = mkIf (self ? rev) self.rev;
system.stateVersion = "20.09";