feat(nix): add settings to automatically run the gc
this should make it slightly easier to use nix without manually running the GC, but also doesn't run anything in the bg for this because that could be poor UX
This commit is contained in:
parent
f8f309c54b
commit
6b65b1d3fd
1 changed files with 7 additions and 0 deletions
|
|
@ -25,6 +25,13 @@ in
|
||||||
# source: https://nix.dev/manual/nix/2.26/command-ref/new-cli/nix3-store-optimise
|
# source: https://nix.dev/manual/nix/2.26/command-ref/new-cli/nix3-store-optimise
|
||||||
nix.settings.auto-optimise-store = true;
|
nix.settings.auto-optimise-store = true;
|
||||||
|
|
||||||
|
# trigger the garbage collector automatically
|
||||||
|
# when free space in /nix/store goes below this
|
||||||
|
nix.settings.min-free = 1000000000; # 1GB
|
||||||
|
# free up to this many bytes in an automatic invocation
|
||||||
|
# to avoid it taking too long
|
||||||
|
nix.settings.max-free = 5000000000; # 5GB
|
||||||
|
|
||||||
environment.systemPackages =
|
environment.systemPackages =
|
||||||
with pkgs;
|
with pkgs;
|
||||||
lib.mkIf config.nixowos.allowAddingPackages [
|
lib.mkIf config.nixowos.allowAddingPackages [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue