2024-01-27 19:29:30 +00:00
|
|
|
{ config
|
|
|
|
, pkgs
|
|
|
|
, lib
|
|
|
|
, flake
|
|
|
|
, ...
|
2023-10-28 11:02:04 +00:00
|
|
|
}: {
|
|
|
|
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
|
|
|
];
|
|
|
|
|
|
|
|
nix = {
|
|
|
|
# Use default version alias for nix package
|
|
|
|
package = pkgs.nix;
|
|
|
|
gc.automatic = true;
|
|
|
|
optimise.automatic = true;
|
|
|
|
|
2023-11-16 21:05:04 +00:00
|
|
|
registry = {
|
|
|
|
nixpkgs.flake = flake.inputs.nixpkgs;
|
|
|
|
unstable.flake = flake.inputs.unstable;
|
|
|
|
system.flake = flake.self;
|
|
|
|
};
|
|
|
|
|
2023-10-28 11:02:04 +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
|
2024-01-27 19:29:30 +00:00
|
|
|
trusted-users = [ "root" "@wheel" ];
|
2023-10-28 11:02:04 +00:00
|
|
|
# Allow only group wheel to connect to the nix daemon
|
2024-01-27 19:29:30 +00:00
|
|
|
allowed-users = [ "@wheel" ];
|
2023-10-28 11:02:04 +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
|
|
|
|
'';
|
|
|
|
|
|
|
|
nixPath = [
|
|
|
|
"nixpkgs=${flake.inputs.nixpkgs}"
|
2023-10-30 14:54:23 +00:00
|
|
|
"nixos-config=${../lib/compat/nixos}"
|
2023-10-28 11:02:04 +00:00
|
|
|
"home-manager=${flake.inputs.home-manager}"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|