2022-08-13 20:35:43 +00:00
|
|
|
{
|
2022-11-22 11:30:54 +00:00
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
inputs,
|
|
|
|
...
|
|
|
|
}: {
|
2022-08-13 20:35:43 +00:00
|
|
|
nix = {
|
2022-08-23 22:53:38 +00:00
|
|
|
# Use default version alias for nix package
|
|
|
|
package = pkgs.nix;
|
2022-08-13 20:35:43 +00:00
|
|
|
gc.automatic = true;
|
|
|
|
optimise.automatic = true;
|
2022-11-22 11:30:54 +00:00
|
|
|
settings = {
|
|
|
|
# Improve nix store disk usage
|
|
|
|
auto-optimise-store = true;
|
|
|
|
# Prevents impurities in builds
|
|
|
|
sandbox = true;
|
2023-03-27 11:35:59 +00:00
|
|
|
# Give root and @wheel special privileges with nix
|
2022-11-22 11:30:54 +00:00
|
|
|
trusted-users = ["root" "@wheel"];
|
2023-03-27 11:35:59 +00:00
|
|
|
# Allow only group wheel to connect to the nix daemon
|
|
|
|
allowed-users = ["@wheel"];
|
2022-11-22 11:30:54 +00:00
|
|
|
};
|
2022-08-13 20:35:43 +00:00
|
|
|
# Generally useful nix option defaults
|
2023-03-27 16:03:28 +00:00
|
|
|
extraOptions = lib.mkForce ''
|
2022-08-13 20:35:43 +00:00
|
|
|
min-free = 536870912
|
|
|
|
keep-outputs = true
|
|
|
|
keep-derivations = true
|
|
|
|
fallback = true
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|