From 0b933dc9a57b28bfae87e65479e31f35b98153d2 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Thu, 9 Jan 2025 12:45:49 -0500 Subject: [PATCH] Auto-optimize store --- nixos/machines/crash/configuration.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/nixos/machines/crash/configuration.nix b/nixos/machines/crash/configuration.nix index 9916a6b..50138ba 100644 --- a/nixos/machines/crash/configuration.nix +++ b/nixos/machines/crash/configuration.nix @@ -8,11 +8,6 @@ imports = [ ]; - nix.settings.trusted-users = [ - "root" - "nathan" - ]; - programs.ssh.extraConfig = '' Host eu.nixbuild.net PubkeyAcceptedKeyTypes ssh-ed25519 @@ -29,6 +24,18 @@ }; nix = { + settings = { + auto-optimise-store = true; + trusted-users = [ + "root" + "nathan" + ]; + }; + gc = { + automatic = true; + dates = "hourly"; + options = "--delete-older-than 7d"; + }; distributedBuilds = true; buildMachines = [ {