From 95656c9cff3f24e05f400d0bee5daedd2d30ad82 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 23 Sep 2020 15:35:53 -0300 Subject: Enable automatic GC of NixOS --- vps-configuration.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'vps-configuration.nix') diff --git a/vps-configuration.nix b/vps-configuration.nix index 4897b95..5c7d790 100644 --- a/vps-configuration.nix +++ b/vps-configuration.nix @@ -66,6 +66,18 @@ in { interfaces.ens3.useDHCP = true; }; + nix = { + gc = { + automatic = true; + options = "--delete-older-than 7d"; + }; + # min-free 1G + extraOptions = '' + min-free = ${toString (1024 * 1024 * 1024)} + ''; + }; + + environment = { systemPackages = with pkgs; [ vim -- cgit v1.2.3