os/modules/core/nix.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
754 B
Nix
Raw Normal View History

2023-01-28 22:51:33 +00:00
{
config,
pkgs,
lib,
inputs,
...
2022-11-22 11:30:54 +00:00
}: {
nix = {
# Use default version alias for nix package
package = pkgs.nix;
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;
# give root and @wheel special privileges with nix
2023-01-28 22:51:33 +00:00
trusted-users = ["root" "@wheel"];
2022-11-22 11:30:54 +00:00
# This is just a representation of the nix default
2023-01-28 22:51:33 +00:00
system-features = ["nixos-test" "benchmark" "big-parallel" "kvm"];
2022-11-22 11:30:54 +00:00
};
# Generally useful nix option defaults
extraOptions = ''
min-free = 536870912
keep-outputs = true
keep-derivations = true
fallback = true
'';
};
}