os/modules/nix/default.nix

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

41 lines
941 B
Nix
Raw Normal View History

{
2022-11-22 11:30:54 +00:00
config,
pkgs,
lib,
2023-11-11 00:05:42 +00:00
flake,
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;
2023-11-11 00:05:42 +00:00
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
2022-11-22 11:30:54 +00:00
trusted-users = ["root" "@wheel"];
# Allow only group wheel to connect to the nix daemon
allowed-users = ["@wheel"];
2022-11-22 11:30:54 +00:00
};
2023-11-11 00:05:42 +00:00
# Generally useful nix option defaults
extraOptions = lib.mkForce ''
experimental-features = flakes nix-command
min-free = 536870912
keep-outputs = true
keep-derivations = true
fallback = true
'';
2023-11-11 00:05:42 +00:00
nixPath = [
"nixpkgs=${flake.inputs.nixpkgs}"
"nixos-config=${../../lib/compat/nixos}"
"home-manager=${flake.inputs.home-manager}"
];
};
}