mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-11-21 22:03:19 +01:00
feat: automatic garbage collection
This commit is contained in:
parent
2c563c54ee
commit
102ae0ee62
@ -242,7 +242,9 @@ systemctl --failed
|
|||||||
* https://nixos.org/manual/nix/stable/package-management/garbage-collection.html
|
* https://nixos.org/manual/nix/stable/package-management/garbage-collection.html
|
||||||
* https://discourse.nixos.org/t/why-doesnt-nix-collect-garbage-remove-old-generations-from-efi-menu/17592/4
|
* https://discourse.nixos.org/t/why-doesnt-nix-collect-garbage-remove-old-generations-from-efi-menu/17592/4
|
||||||
|
|
||||||
For all profiles:
|
This is automated in [base.nix](modules/base.nix) with the `nix.gc` option.
|
||||||
|
|
||||||
|
Run manually for all profiles:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo nix-collect-garbage --delete-older-than 14d
|
sudo nix-collect-garbage --delete-older-than 14d
|
||||||
|
@ -121,6 +121,13 @@
|
|||||||
|
|
||||||
nix.settings.auto-optimise-store = true;
|
nix.settings.auto-optimise-store = true;
|
||||||
|
|
||||||
|
# https://nixos.wiki/wiki/Storage_optimization#Automation
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 7d";
|
||||||
|
};
|
||||||
|
|
||||||
# Firewall.
|
# Firewall.
|
||||||
# https://nixos.wiki/wiki/Firewall
|
# https://nixos.wiki/wiki/Firewall
|
||||||
# -> Firewall rules may be overwritten by docker, as per https://github.com/NixOS/nixpkgs/issues/111852
|
# -> Firewall rules may be overwritten by docker, as per https://github.com/NixOS/nixpkgs/issues/111852
|
||||||
|
Loading…
Reference in New Issue
Block a user