2023-05-04 06:17:03 +02:00
|
|
|
{
|
|
|
|
inputs,
|
2023-06-02 10:23:40 +02:00
|
|
|
stateVersion,
|
2023-10-09 15:07:30 +02:00
|
|
|
pkgs,
|
2023-05-04 06:17:03 +02:00
|
|
|
...
|
|
|
|
}: {
|
2023-02-27 03:56:37 +01:00
|
|
|
nix = {
|
|
|
|
settings = {
|
|
|
|
auto-optimise-store = true;
|
2023-10-05 00:41:46 +02:00
|
|
|
allowed-users = ["@wheel"];
|
2023-09-26 22:25:58 +02:00
|
|
|
trusted-users = ["root"];
|
2023-05-23 07:45:57 +02:00
|
|
|
system-features = ["recursive-nix" "repl-flake" "big-parallel"];
|
2023-02-27 03:56:37 +01:00
|
|
|
substituters = [
|
|
|
|
"https://nix-community.cachix.org"
|
2023-09-05 21:00:29 +02:00
|
|
|
"https://cache.nixos.org"
|
|
|
|
"https://nixpkgs-wayland.cachix.org"
|
2023-12-13 17:29:19 +01:00
|
|
|
"https://ai.cachix.org"
|
2023-02-27 03:56:37 +01:00
|
|
|
];
|
|
|
|
trusted-public-keys = [
|
|
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
2023-09-05 21:00:29 +02:00
|
|
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
|
|
|
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
|
2023-12-13 17:29:19 +01:00
|
|
|
"ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc="
|
2023-02-27 03:56:37 +01:00
|
|
|
];
|
|
|
|
cores = 0;
|
|
|
|
max-jobs = "auto";
|
2023-09-26 22:25:58 +02:00
|
|
|
# make agenix rekey find the secrets even without trusted user
|
|
|
|
extra-sandbox-paths = ["/var/tmp/agenix-rekey?"];
|
2023-02-27 03:56:37 +01:00
|
|
|
};
|
|
|
|
daemonCPUSchedPolicy = "batch";
|
|
|
|
daemonIOSchedPriority = 5;
|
|
|
|
distributedBuilds = true;
|
|
|
|
extraOptions = ''
|
2023-05-27 07:12:18 +02:00
|
|
|
builders-use-substitutes = true
|
|
|
|
experimental-features = nix-command flakes recursive-nix
|
|
|
|
flake-registry = /etc/nix/registry.json
|
2023-02-27 03:56:37 +01:00
|
|
|
'';
|
2024-02-09 01:33:07 +01:00
|
|
|
nixPath = ["nixpkgs=/run/current-system/nixpkgs"];
|
2023-02-27 03:56:37 +01:00
|
|
|
optimise.automatic = true;
|
2023-04-24 10:43:36 +02:00
|
|
|
gc = {
|
|
|
|
automatic = true;
|
2024-01-26 01:04:08 +01:00
|
|
|
dates = "monthly";
|
2023-04-24 10:43:36 +02:00
|
|
|
};
|
2023-05-04 06:17:03 +02:00
|
|
|
|
|
|
|
registry = {
|
|
|
|
nixpkgs.flake = inputs.nixpkgs;
|
|
|
|
p.flake = inputs.nixpkgs;
|
|
|
|
pkgs.flake = inputs.nixpkgs;
|
2024-04-26 22:06:02 +02:00
|
|
|
templates.flake = inputs.templates;
|
2023-05-04 06:17:03 +02:00
|
|
|
};
|
2023-02-27 03:56:37 +01:00
|
|
|
};
|
2024-02-09 01:33:07 +01:00
|
|
|
system = {
|
|
|
|
extraSystemBuilderCmds = ''
|
|
|
|
ln -sv ${inputs.nixpkgs} $out/nixpkgs
|
|
|
|
'';
|
|
|
|
};
|
2023-10-09 15:07:30 +02:00
|
|
|
programs.nix-ld.enable = true;
|
2023-06-02 10:23:40 +02:00
|
|
|
system.stateVersion = stateVersion;
|
2023-02-27 03:56:37 +01:00
|
|
|
}
|