From 35ac61cfdcbbb455bb7986105433caf4c9d69177 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Fri, 27 Mar 2026 21:00:08 -0400 Subject: [PATCH] gc --- configurations/home/srid@sincereintent.nix | 1 + configurations/nixos/pureintent/default.nix | 8 +++----- flake.lock | 6 +++--- modules/home/nix/gc.nix | 8 ++++++++ 4 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 modules/home/nix/gc.nix diff --git a/configurations/home/srid@sincereintent.nix b/configurations/home/srid@sincereintent.nix index 3058eb5..9c607a0 100644 --- a/configurations/home/srid@sincereintent.nix +++ b/configurations/home/srid@sincereintent.nix @@ -7,6 +7,7 @@ in imports = [ self.homeModules.default self.homeModules.darwin-only + (self + /modules/home/nix/gc.nix) ]; home.username = "srid"; diff --git a/configurations/nixos/pureintent/default.nix b/configurations/nixos/pureintent/default.nix index 58797d7..80cf556 100644 --- a/configurations/nixos/pureintent/default.nix +++ b/configurations/nixos/pureintent/default.nix @@ -30,17 +30,15 @@ in # Remote builders "${homeMod}/nix/buildMachines" "${homeMod}/nix/buildMachines/sincereintent.nix" + + "${homeMod}/nix/gc.nix" ]; nix.settings = { sandbox = "relaxed"; extra-experimental-features = [ "impure-derivations" "ca-derivations" ]; }; - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 30d"; - }; + # GC is handled via home-manager (modules/home/nix/gc.nix) zramSwap.enable = true; swapDevices = [{ diff --git a/flake.lock b/flake.lock index f787f2b..f90cb85 100644 --- a/flake.lock +++ b/flake.lock @@ -821,11 +821,11 @@ }, "kolu": { "locked": { - "lastModified": 1774648176, - "narHash": "sha256-CT6Ce/bvi/4fRRG1eGpa9f2z19rrPPRZGvtJ4exX3+U=", + "lastModified": 1774651180, + "narHash": "sha256-YmAU9cLTccojhqkGFZdm0L/dbZkPw7sPJxo6uirlsto=", "owner": "juspay", "repo": "kolu", - "rev": "c9d6087cfae6f06ae637bc08b4e8db3e5e07fcc3", + "rev": "575b3c18672e6a31784046d5e1c777242ab5f886", "type": "github" }, "original": { diff --git a/modules/home/nix/gc.nix b/modules/home/nix/gc.nix new file mode 100644 index 0000000..f4c1342 --- /dev/null +++ b/modules/home/nix/gc.nix @@ -0,0 +1,8 @@ +{ ... }: +{ + nix.gc = { + automatic = true; + dates = "daily"; + options = "--delete-older-than 1d"; + }; +}