From ff22e223de0610ca183f9e0c060073e53f59be1a Mon Sep 17 00:00:00 2001 From: Mark Nipper Date: Wed, 4 Jun 2025 12:44:39 -0700 Subject: Clean up user home manager profiles --- hosts/common/core/nix.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hosts/common/core/nix.nix b/hosts/common/core/nix.nix index 14252d8..608425f 100644 --- a/hosts/common/core/nix.nix +++ b/hosts/common/core/nix.nix @@ -24,6 +24,13 @@ in { }; - systemd.services."nix-daemon".environment.TMPDIR = build-tmp; + systemd = { + services."nix-daemon".environment.TMPDIR = build-tmp; + user.services."nix-gc" = { + description = "Garbage collection for user profiles"; + script = "/run/current-system/sw/bin/nix-collect-garbage --delete-older-than 30d"; + startAt = "daily"; + }; + } } -- cgit v1.2.3