From 2ade5ba9d083b3f21b6602f6781436962d440562 Mon Sep 17 00:00:00 2001 From: Daniel Frank Date: Mon, 10 Jun 2019 14:27:53 +0200 Subject: [PATCH] Automatically cleanup and optimize nix store to avoid using up all inodes on the root fs --- configuration.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configuration.nix b/configuration.nix index 7cd731b..d337b0d 100644 --- a/configuration.nix +++ b/configuration.nix @@ -6,7 +6,7 @@ { imports = - [ # Include the results of the hardware scan. + [ ./hardware-configuration.nix ./sshusers.nix ./variables.nix @@ -47,6 +47,11 @@ # Automatic update each day at 04:40. Will not restart the system, so a reboot every now and then is a good idea. system.autoUpgrade.enable = true; + nix = { + autoOptimiseStore = true; + gc.automatic = true; + gc.options = "--delete-older-than 14d"; + }; # Select internationalisation properties. i18n = {