fix(hm): configure nix gc
This ensures the old home-manager generations are deleted after a while
This commit is contained in:
parent
ee2908403a
commit
3ad83d4fd7
1 changed files with 17 additions and 5 deletions
|
@ -31,11 +31,23 @@ in
|
||||||
# Add gopass if pass is enabled
|
# Add gopass if pass is enabled
|
||||||
home.packages = lib.optional config.programs.password-store.enable pkgs.gopass;
|
home.packages = lib.optional config.programs.password-store.enable pkgs.gopass;
|
||||||
|
|
||||||
nix.settings.use-xdg-base-directories = fromOs [
|
nix = {
|
||||||
|
# Run GC for Home Manager generations
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
frequency = "weekly";
|
||||||
|
options = "--delete-older-than 30d";
|
||||||
|
# run between 0 and 45min after boot if run was missed
|
||||||
|
randomizedDelaySec = "45min";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Use XDG directories
|
||||||
|
settings.use-xdg-base-directories = fromOs [
|
||||||
"nix"
|
"nix"
|
||||||
"settings"
|
"settings"
|
||||||
"use-xdg-base-directories"
|
"use-xdg-base-directories"
|
||||||
] true;
|
] true;
|
||||||
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
# Better cat (bat)
|
# Better cat (bat)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue