From f5e082c185f717472b939cea58a5659ba68940fa Mon Sep 17 00:00:00 2001 From: klarkc Date: Thu, 21 Dec 2023 09:19:02 -0300 Subject: [PATCH] feat(cache): add garbage collection --- setups/cache/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/setups/cache/default.nix b/setups/cache/default.nix index 5d44c62..1eacd06 100644 --- a/setups/cache/default.nix +++ b/setups/cache/default.nix @@ -24,12 +24,16 @@ let age.secrets.cache.file = "${secrets}/cache.age"; system.stateVersion = config.system.nixos.version; boot.loader.systemd-boot.enable = true; - # nix-serve + networking.firewall.enable = false; + # cache service services.nix-serve = { enable = true; secretKeyFile = config.age.secrets.cache.path; }; - networking.firewall.enable = false; + nix.extraOptions = '' + min-free = 2684354560 + max-free = 5368709120 + ''; # SSH services.sshd.enable = true; users.users.root.openssh = { inherit authorizedKeys; }; @@ -78,9 +82,10 @@ let content = { type = "btrfs"; extraArgs = [ - "--label" "root" + "--label" + "root" "-f" # Override existing partition - ]; + ]; # Subvolumes must set a mountpoint in order to be mounted, # unless their parent is mounted subvolumes = {