From bccd0d8eb9ec475b3d4c64cf0a3a03d6ecbf7fa5 Mon Sep 17 00:00:00 2001 From: alejandro-angulo Date: Sat, 7 Dec 2024 22:30:06 -0800 Subject: [PATCH] More aggressive data cleanup/optimisation --- homes/x86_64-linux/alejandro@git/default.nix | 6 ++++++ modules/nixos/nix/default.nix | 6 +++--- systems/x86_64-linux/git/default.nix | 4 ++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/homes/x86_64-linux/alejandro@git/default.nix b/homes/x86_64-linux/alejandro@git/default.nix index ed30ca7..acfb642 100644 --- a/homes/x86_64-linux/alejandro@git/default.nix +++ b/homes/x86_64-linux/alejandro@git/default.nix @@ -7,4 +7,10 @@ zsh.enable = true; }; }; + + nix.gc = { + automatic = true; + options = "-d"; + frequency = "03:15"; + }; } diff --git a/modules/nixos/nix/default.nix b/modules/nixos/nix/default.nix index 6afd7e0..4e81944 100644 --- a/modules/nixos/nix/default.nix +++ b/modules/nixos/nix/default.nix @@ -53,9 +53,9 @@ in { # TODO: Configure distributedBuilds and buildMachines? gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 30d"; + automatic = lib.mkDefault true; + dates = lib.mkDefault "weekly"; + options = lib.mkDefault "--delete-older-than 30d"; }; }; }; diff --git a/systems/x86_64-linux/git/default.nix b/systems/x86_64-linux/git/default.nix index eea3bd9..f16169b 100644 --- a/systems/x86_64-linux/git/default.nix +++ b/systems/x86_64-linux/git/default.nix @@ -27,6 +27,10 @@ in { }; }; + nix.settings.auto-optimise-store = true; + nix.gc.dates = "03:15"; + nix.gc.options = "-d"; + services.nginx.virtualHosts."${domain}" = { forceSSL = true; enableACME = true;