···
1
+
# https://github.com/isabelroses/dotfiles/blob/main/modules/base/nix/nix.nix
mySnippets.nix.settings = lib.mkOption {
···
18
+
# Allows Nix to automatically pick UIDs for builds, rather than creating nixbld* user accounts
19
+
# which is BEYOND annoying, which makes this a really nice feature to have
20
+
"auto-allocate-uids"
22
+
# allows Nix to execute builds inside cgroups
23
+
# remember you must also enable use-cgroups in the nix.conf or settings
26
+
# enable the use of the fetchClosure built-in function in the Nix language.
···
trusted-users = ["@admin" "@wheel" "nixbuild"];
39
+
# Free up to 20GiB whenever there is less than 5GB left.
40
+
# this setting is in bytes, so we multiply with 1024 by 3
41
+
min-free = 5 * 1024 * 1024 * 1024;
42
+
max-free = 20 * 1024 * 1024 * 1024;
44
+
# automatically optimise symlinks
45
+
# Disable auto-optimise-store because of this issue:
46
+
# https://github.com/NixOS/nix/issues/7273
47
+
# but we use lix which has a fix for this issue:
48
+
# https://gerrit.lix.systems/c/lix/+/2100
49
+
auto-optimise-store = true;
51
+
# we don't want to track the registry, but we do want to allow the usage
52
+
# of the `flake:` references, so we need to enable use-registries
53
+
use-registries = true;
54
+
flake-registry = "";
56
+
# let the system decide the number of max jobs
59
+
# this defaults to true, however it slows down evaluation so maybe we should disable it
60
+
# some day, but we do need it for catppuccin/nix so maybe not too soon
61
+
allow-import-from-derivation = true;
63
+
# for direnv GC roots
64
+
keep-derivations = true;
65
+
keep-outputs = true;
67
+
# use xdg base directories for all the nix things
68
+
use-xdg-base-directories = true;
69
+
# don't warn me if the current working tree is dirty
70
+
# i don't need the warning because i'm working on it right now
73
+
# maximum number of parallel TCP connections used to fetch imports and binary caches, 0 means no limit
74
+
http-connections = 50;
76
+
# whether to accept nix configuration from a flake without prompting
77
+
# littrally a CVE waiting to happen <https://x.com/puckipedia/status/1693927716326703441>
78
+
accept-flake-config = false;