mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nix: expose auto-gc as homeModule
This commit is contained in:
parent
f9ac81a1a0
commit
bd67a685dd
3 changed files with 14 additions and 15 deletions
|
|
@ -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
|
||||
];
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue