infra/nix/os/snippets/nix-settings.nix

40 lines
841 B
Nix
Raw Normal View History

2024-02-08 20:53:22 +01:00
{
nodeFlake,
pkgs,
lib,
...
2024-11-15 10:17:56 +01:00
}:
let
pkgsUnstable = import nodeFlake.inputs.nixpkgs-unstable { inherit (pkgs) system config; };
in
{
2023-12-01 21:00:17 +01:00
nix.daemonCPUSchedPolicy = "idle";
nix.daemonIOSchedClass = "idle";
nix.settings.max-jobs = lib.mkDefault "auto";
nix.settings.cores = lib.mkDefault 0;
nix.settings.sandbox = true;
2024-11-15 10:17:56 +01:00
nix.nixPath = [ "nixpkgs=${pkgs.path}" ];
2023-12-01 21:00:17 +01:00
nix.settings.experimental-features = [
2023-12-01 21:00:17 +01:00
"nix-command"
"flakes"
"ca-derivations"
2023-12-01 21:00:17 +01:00
];
nix.settings.system-features = [
2023-12-01 21:00:17 +01:00
"recursive-nix"
"big-parallel"
"kvm"
"nixos-test"
];
# nix.registry.nixpkgs.flake = nodeFlake.inputs.nixpkgs;
nix.registry.nixpkgs.to = {
type = "path";
path = nodeFlake.inputs.nixpkgs.outPath;
2024-11-15 10:17:56 +01:00
inherit (nodeFlake.inputs.nixpkgs) narHash;
};
nix.package = pkgsUnstable.nixVersions.latest;
2023-12-01 21:00:17 +01:00
}