diff options
author | Franck Cuny <franck@fcuny.net> | 2023-01-10 08:59:20 -0800 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2023-01-10 08:59:20 -0800 |
commit | 3b6564205caefc1743b31be211e96282576f773b (patch) | |
tree | 47438c57150fbb5186c1066a44a4e48382ba8ffa /modules/system | |
parent | feat(hosts/tahoe): rotate the screen 90 degree (diff) | |
download | world-3b6564205caefc1743b31be211e96282576f773b.tar.gz |
ref(modules/nix): update a number of settings for nix
Inspired by https://jackson.dev/post/nix-reasonable-defaults/
Diffstat (limited to '')
-rw-r--r-- | modules/system/nix/default.nix | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/modules/system/nix/default.nix b/modules/system/nix/default.nix index 01df04b..67029ad 100644 --- a/modules/system/nix/default.nix +++ b/modules/system/nix/default.nix @@ -2,10 +2,6 @@ { lib, pkgs, ... }: { nix = { package = pkgs.nixFlakes; - extraOptions = '' - experimental-features = nix-command flakes - ''; - settings = { trusted-users = [ "root" "@wheel" ]; auto-optimise-store = true; @@ -17,6 +13,21 @@ "cachix.cachix.org-1:eWNHQldwUO7G2VkjpnjDbWwy4KQ/HNxht7H4SSoMckM=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; + experimental-features = [ "nix-command" "flakes" ]; + # Whether to warn about dirty Git/Mercurial trees - this is not + # useful information to me. + warn-dirty = false; + # The timeout (in seconds) for establishing connections in the binary + # cache substituter. It corresponds to curl’s –connect-timeout option. + # The default is equivalent to 300 seconds, way too long. + connect-timeout = 5; + # The number of lines of the tail of the log to show if a build fails. + # The default is 10 and it's usually too short. + log-lines = 25; + # If set to true, Nix will fall back to building from source if + # a binary substitute fails. This is equivalent to the –fallback + # flag. The default is false. + fallback = true; }; gc = { |