nix: expose auto-gc as homeModule

This commit is contained in:
Primrose 2024-07-13 09:51:36 +02:00
parent f9ac81a1a0
commit bd67a685dd
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
3 changed files with 14 additions and 15 deletions

View file

@ -90,19 +90,6 @@ let
inherit pkgs;
hostname = name;
};
# Enable user gc only when home-manager is used standalone
auto-gc =
{ lib, ... }:
{
nix.gc = {
automatic = true;
frequency = lib.mkMerge [
(lib.mkIf pkgs.stdenv.isDarwin "daily")
(lib.mkIf pkgs.stdenv.isLinux "1 day")
];
};
};
in
inputs.home-manager.lib.homeManagerConfiguration {
inherit (args) pkgs;
@ -112,7 +99,7 @@ let
./home/${name}
nixpkgsRegistry
hmOpts
auto-gc
self.homeModules.auto-gc # Enable user gc only when home-manager is used standalone
];
}
);