-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #142 from nix-community/sane-nix-settings
add nix-settings from srvos
- Loading branch information
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |