ljkasdljkadsjkl
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
# serge <3
|
||||
# TODO: distributed (s)ccache (with redis?)
|
||||
# TODO: garbage collect this
|
||||
|
||||
{
|
||||
programs.ccache.enable = true;
|
||||
|
||||
+23
-6
@@ -14,12 +14,21 @@
|
||||
!include ${config.sops.secrets.nix-access-tokens-all.path}
|
||||
'';
|
||||
|
||||
# https://nix.dev/manual/nix/stable/command-ref/conf-file.html
|
||||
# https://nix.dev/manual/nix/latest/command-ref/conf-file.html
|
||||
# https://docs.lix.systems/manual/lix/stable/command-ref/conf-file.html
|
||||
nix.settings = {
|
||||
|
||||
# === behaviour
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
# "pipe-operator" # not supported on lix 2.91
|
||||
];
|
||||
log-lines = 35;
|
||||
# keep-going = true;
|
||||
|
||||
# === access
|
||||
#nix.settings.allowed-users = [ "@builders" ]; # TODO: this
|
||||
allowed-users = [
|
||||
# default is [ "*" ]
|
||||
@@ -30,13 +39,20 @@
|
||||
"root"
|
||||
"@wheel"
|
||||
];
|
||||
|
||||
# === eval and realization
|
||||
keep-derivations = true; # keep .drv in store, great with nix-diff
|
||||
max-silent-time = 3600; # kill long-running silent builds
|
||||
|
||||
# === substitution
|
||||
connect-timeout = 5; # timeout in seconds for binary caches
|
||||
download-attempts = lib.mkDefault 2; # download attempts, in case a binary cache fails
|
||||
# fallback = lib.mkDefault true; # fallback to building if a binary cache fails
|
||||
|
||||
# === store
|
||||
#settings.keep-failed = true; # fills up $TMPDIR
|
||||
auto-optimise-store = true; # deduplicate with hardlinks, expensive. Alternative: nix-store --optimise
|
||||
max-silent-time = 3600;
|
||||
connect-timeout = 5; # seconds timeout for binary caches
|
||||
#nix.settings.keep-failed = true; # fills up $TMPDIR
|
||||
log-lines = 35;
|
||||
min-free = 3 * 1024 * 1024 * 1024; # starts cg
|
||||
min-free = 5 * 1024 * 1024 * 1024; # starts cg
|
||||
max-free = 20 * 1024 * 1024 * 1024; # condition to end gc triggered by min-free
|
||||
|
||||
# should not be needed since https://github.com/NixOS/nixpkgs/pull/383052
|
||||
@@ -53,8 +69,9 @@
|
||||
];
|
||||
};
|
||||
|
||||
#nix.optimize.automatic = true; # periodic store optimization, alternative nix.settings.auto-optimise-store
|
||||
|
||||
nix.gc = {
|
||||
#nix.optimize.automatic = true; # periodic optimization
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = lib.mkIf config.system.autoUpgrade.enable "--delete-older-than 15d";
|
||||
|
||||
Reference in New Issue
Block a user