add nix-settings from srvos
if used as a recovery system, it's useful to have flakes etc enabled.
This commit is contained in:
parent
b75f16f72f
commit
971b6849d5
2 changed files with 32 additions and 0 deletions
|
@ -23,6 +23,10 @@
|
|||
# for zapping of disko
|
||||
environment.systemPackages = [ pkgs.jq ];
|
||||
|
||||
imports = [
|
||||
./nix-settings.nix
|
||||
];
|
||||
|
||||
systemd.services.log-network-status = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
# No point in restarting this. We just need this after boot
|
||||
|
|
28
nix/nix-settings.nix
Normal file
28
nix/nix-settings.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
# 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;
|
||||
}
|
Loading…
Reference in a new issue