forked from clan/clan-core
Configure nix inside the machines
Add sane nix defaults for debugging and usability reasons
This commit is contained in:
parent
20cdcbcb44
commit
0604d5a83d
@ -7,6 +7,7 @@
|
||||
./meshnamed
|
||||
./networking.nix
|
||||
./packages.nix
|
||||
./nix-settings.nix
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
# just some example options. Can be removed later
|
||||
./vm.nix
|
||||
|
28
nixosModules/clanCore/nix-settings.nix
Normal file
28
nixosModules/clanCore/nix-settings.nix
Normal file
@ -0,0 +1,28 @@
|
||||
{ lib, ... }:
|
||||
# Taken from:
|
||||
# https://github.com/nix-community/srvos/blob/main/nixos/common/nix.nix
|
||||
{
|
||||
# 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);
|
||||
|
||||
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 New Issue
Block a user