From 69459cf910daa0fccf17a7c8556718d17579e96b Mon Sep 17 00:00:00 2001 From: foosinn Date: Mon, 31 Jan 2022 14:44:15 +0100 Subject: [PATCH] auto garbage collect --- configuration.nix | 3 ++- roles/nix.nix | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 roles/nix.nix diff --git a/configuration.nix b/configuration.nix index e843abe..429dd2c 100644 --- a/configuration.nix +++ b/configuration.nix @@ -15,8 +15,9 @@ ./roles/desktop.nix ./roles/dev.nix ./roles/mail.nix - ./roles/vpn.nix ./roles/network.nix + ./roles/nix.nix + ./roles/vpn.nix ./roles/work.nix ]; diff --git a/roles/nix.nix b/roles/nix.nix new file mode 100644 index 0000000..97bbe06 --- /dev/null +++ b/roles/nix.nix @@ -0,0 +1,11 @@ +{ config, lib, pkgs, ... }: + +{ + + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; + +}