2022-08-13 20:35:43 +00:00
|
|
|
{
|
2022-11-22 11:30:54 +00:00
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
2023-11-10 18:48:06 +00:00
|
|
|
flake,
|
2022-11-22 11:30:54 +00:00
|
|
|
...
|
|
|
|
}: {
|
2023-11-10 18:48:06 +00:00
|
|
|
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
2023-11-20 17:43:39 +00:00
|
|
|
"1password"
|
|
|
|
"1password-cli"
|
2024-01-25 18:21:12 +00:00
|
|
|
"brscan5"
|
|
|
|
"brscan5-etc-files"
|
2023-11-10 18:48:06 +00:00
|
|
|
"facetimehd-firmware"
|
2023-11-20 17:43:39 +00:00
|
|
|
"slack"
|
2023-11-10 18:48:06 +00:00
|
|
|
"veracrypt"
|
|
|
|
"zoom"
|
|
|
|
];
|
|
|
|
|
2024-03-06 17:50:48 +00:00
|
|
|
system.activationScripts.diff-closures = {
|
|
|
|
text =''
|
|
|
|
if [[ -e /run/current-system ]]; then
|
|
|
|
${config.nix.package}/bin/nix store diff-closures \
|
|
|
|
/run/current-system "$systemConfig" \
|
|
|
|
--extra-experimental-features nix-command
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
supportsDryActivation = true;
|
|
|
|
};
|
|
|
|
|
2022-08-13 20:35:43 +00:00
|
|
|
nix = {
|
2024-05-27 08:58:26 +00:00
|
|
|
# Use lix (forked nix)
|
|
|
|
package = pkgs.lix;
|
2022-08-13 20:35:43 +00:00
|
|
|
gc.automatic = true;
|
|
|
|
optimise.automatic = true;
|
2023-11-10 18:48:06 +00:00
|
|
|
|
2024-04-19 14:54:05 +00:00
|
|
|
registry = {
|
|
|
|
nixpkgs.flake = flake.inputs.nixpkgs;
|
|
|
|
#unstable.flake = flake.inputs.unstable;
|
|
|
|
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;
|
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"];
|
2023-11-10 18:48:06 +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-11-10 18:48:06 +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 ''
|
2023-03-27 16:53:54 +00:00
|
|
|
experimental-features = flakes nix-command
|
2022-08-13 20:35:43 +00:00
|
|
|
min-free = 536870912
|
|
|
|
keep-outputs = true
|
|
|
|
keep-derivations = true
|
|
|
|
fallback = true
|
|
|
|
'';
|
2023-11-10 18:48:06 +00:00
|
|
|
|
|
|
|
nixPath = [
|
|
|
|
"nixpkgs=${flake.inputs.nixpkgs}"
|
|
|
|
"nixos-config=${../../lib/compat/nixos}"
|
|
|
|
"home-manager=${flake.inputs.home-manager}"
|
|
|
|
];
|
2022-08-13 20:35:43 +00:00
|
|
|
};
|
|
|
|
}
|