nixos-config/config/nix.nix

57 lines
1.3 KiB
Nix
Raw Normal View History

2022-01-27 16:16:42 +00:00
{ pkgs, lib, ... }: {
imports = [
./workarounds
];
2022-01-14 13:03:14 +00:00
nixpkgs.config.allowUnfree = true;
nix = {
settings = {
sandbox = true;
trusted-users = [ "@wheel" ];
require-sigs = false;
auto-optimise-store = true;
2022-02-08 09:48:37 +00:00
builders-use-substitutes = true;
};
2022-01-14 13:03:14 +00:00
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
'';
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
optimise = {
automatic = true;
dates = [ "weekly" ];
};
2022-02-08 09:48:37 +00:00
buildMachines = [
{
hostName = "build-nas";
2022-02-08 12:49:02 +00:00
systems = [ "x86_64-linux" ];
2022-02-08 09:48:37 +00:00
maxJobs = 12;
speedFactor = 1;
2022-02-08 10:09:57 +00:00
supportedFeatures = [ "big-parallel" "gccarch-znver1" ];
}
{
hostName = "build-pc";
2022-02-08 12:44:23 +00:00
systems = [ "x86_64-linux" "i686-linux" ];
2022-02-08 10:09:57 +00:00
maxJobs = 16;
speedFactor = 1;
supportedFeatures = [ "big-parallel" "gccarch-znver2" ];
2022-02-08 09:48:37 +00:00
}
];
distributedBuilds = true;
2022-01-14 13:03:14 +00:00
};
2022-01-14 13:07:01 +00:00
system.autoUpgrade = {
enable = true;
2022-01-18 06:19:00 +00:00
flake = "git+https://git.chir.rs/darkkirb/nixos-config.git?ref=main";
2022-01-14 13:07:01 +00:00
flags = [
"--no-write-lock-file"
"-L" # print build logs
];
dates = "daily";
2022-01-27 16:16:42 +00:00
randomizedDelaySec = "86400";
2022-01-14 13:07:01 +00:00
};
2022-01-27 16:16:42 +00:00
systemd.services.nix-daemon.environment.TMPDIR = "/build";
2022-01-14 13:03:14 +00:00
}