os/modules/nix/default.nix

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

67 lines
1.5 KiB
Nix
Raw Permalink Normal View History

{
2022-11-22 11:30:54 +00:00
config,
pkgs,
lib,
2023-09-12 20:07:05 +00:00
flake,
2022-11-22 11:30:54 +00:00
...
}: {
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"steam"
"steam-original"
"steam-run"
2023-10-07 15:18:43 +00:00
"hplip"
"cups-brother-hl3140cw"
2023-12-17 16:14:19 +00:00
"uhk-agent"
"uhk-udev-rules"
2024-01-24 20:17:53 +00:00
"zoom"
];
nix = {
# Use default version alias for nix package
package = pkgs.nix;
gc.automatic = true;
optimise.automatic = true;
2023-09-12 20:07:05 +00:00
registry = {
nixpkgs.flake = flake.inputs.nixpkgs;
unstable.flake = flake.inputs.nixpkgs-unstable;
master.flake = flake.inputs.nixpkgs-master;
system.flake = flake.self;
};
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"];
2023-10-28 21:16:15 +00:00
substituters = [
"https://pub-solar.cachix.org/"
];
trusted-public-keys = [
"pub-solar.cachix.org-1:ZicXIxKgdxMtgSJECWR8iihZxHRvu8ObL4n2cuBmtos="
];
2022-11-22 11:30:54 +00:00
};
2023-09-12 20:07:05 +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-09-12 20:07:05 +00:00
nixPath = [
"nixpkgs=${flake.inputs.nixpkgs}"
"nixos-config=${../../lib/compat/nixos}"
"home-manager=${flake.inputs.home-manager}"
];
};
}