2023-11-19 13:23:42 +01:00
|
|
|
# take from srvos
|
|
|
|
{ lib, ... }:
|
|
|
|
{
|
|
|
|
# Fallback quickly if substituters are not available.
|
|
|
|
nix.settings.connect-timeout = 5;
|
|
|
|
|
|
|
|
# Enable flakes
|
2024-09-20 12:36:12 +02:00
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
2023-11-19 13:23:42 +01:00
|
|
|
|
|
|
|
# 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;
|
|
|
|
}
|