nixos-images/nix/nix-settings.nix
Jörg Thalheim 971b6849d5 add nix-settings from srvos
if used as a recovery system, it's useful to have flakes etc enabled.
2023-11-19 13:23:43 +01:00

28 lines
745 B
Nix

# take from srvos
{ lib, ... }:
{
# Fallback quickly if substituters are not available.
nix.settings.connect-timeout = 5;
# Enable flakes
nix.settings.experimental-features = [
"nix-command"
"flakes"
"repl-flake"
];
# The default at 10 is rarely enough.
nix.settings.log-lines = lib.mkDefault 25;
# Avoid disk full issues
nix.settings.max-free = lib.mkDefault (3000 * 1024 * 1024);
nix.settings.min-free = lib.mkDefault (512 * 1024 * 1024);
# TODO: cargo culted.
nix.daemonCPUSchedPolicy = lib.mkDefault "batch";
nix.daemonIOSchedClass = lib.mkDefault "idle";
nix.daemonIOSchedPriority = lib.mkDefault 7;
# Avoid copying unnecessary stuff over SSH
nix.settings.builders-use-substitutes = true;
}