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 if [[ $EUID == 0 ]]; then
echo "Cleaning up your system..." echo "Cleaning up your system..."
_do sudo nix-collect-garbage ${@:--d} _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 # 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 # 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 # 2 boot entries at any time). Instead, we properly delete them by
@ -73,7 +74,6 @@ function main {
echo "Cleaning up your user profile..." echo "Cleaning up your user profile..."
_do nix-collect-garbage ${@:--d} _do nix-collect-garbage ${@:--d}
fi fi
_do nix-store --optimise
} }
### ###

View file

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