From ae1e318a9ad4a77d46dc3103a73bb99afd1f2bfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 7 Oct 2022 22:17:33 +0200 Subject: [PATCH] Turn automatic nix garbage collection off in microvm --- modules/c3d2.nix | 2 +- modules/microvm.nix | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/c3d2.nix b/modules/c3d2.nix index 13222692..004d25d9 100644 --- a/modules/c3d2.nix +++ b/modules/c3d2.nix @@ -397,7 +397,7 @@ in ); }; gc = { - automatic = true; + automatic = lib.mkDefault true; dates = "06:00"; options = "--delete-older-than 21d"; randomizedDelaySec = "6h"; diff --git a/modules/microvm.nix b/modules/microvm.nix index 7f865942..4d6432c6 100644 --- a/modules/microvm.nix +++ b/modules/microvm.nix @@ -167,5 +167,8 @@ in # autoupdates do not make sense inside MicroVMs with read-only /nix/store c3d2.autoUpdate = false; + + # nix store is mounted read only + nix.gc.automatic = false; }; }