zaphyra's git: nixfiles

zaphyra's nixfiles

commit 3963c36d631a60e275778ad643824c1bb119ac81
parent 65f79ce7f8b4bf871c37e0a33177864626a67efe
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Sun, 24 Aug 2025 19:22:30 +0200

use `nix-cleanup` from tgc-flake
3 files changed, 1 insertion(+), 24 deletions(-)
diff --git a/config/home-manager/zaphyra/home.nix b/config/home-manager/zaphyra/home.nix
@@ -46,8 +46,6 @@
 
     programs.deploymentUtilities
     programs.shellUtilities
-
-    programs.nix-cleanup
   ];
 
 }
diff --git a/config/home-manager/zaphyra/programs/nix-cleanup.nix b/config/home-manager/zaphyra/programs/nix-cleanup.nix
@@ -1,22 +0,0 @@
-{ pkgs, ... }:
-
-{
-
-  home.packages = [
-    (pkgs.writeShellScriptBin "nix-cleanup" ''
-      set -eu
-
-      # Delete everything from this profile that isn't currently needed
-      nix-env --delete-generations old
-
-      # Delete generations older than a week
-      nix-collect-garbage
-      nix-collect-garbage --delete-older-than 7d
-
-      # Optimize
-      nix-store --gc --print-dead
-      nix-store --optimise
-    '')
-  ];
-
-}
diff --git a/config/nixos/modules/programs/shellUtilities.nix b/config/nixos/modules/programs/shellUtilities.nix
@@ -40,6 +40,7 @@ in
         sops
         unzip
         rsync
+        tgc.nix-cleanup
       ];
     };