nixos: add nh and use it's gc
This commit is contained in:
parent
122997fb82
commit
9c5008a965
2 changed files with 9 additions and 17 deletions
14
nixos.nix
14
nixos.nix
|
@ -24,11 +24,15 @@
|
|||
"flakes"
|
||||
];
|
||||
|
||||
# Enable automatic garbage collection.
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 1w";
|
||||
# Enable nh, a bundle of CLI utilities for NixOS
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
|
||||
# Enable automatic garbage collection.
|
||||
clean.enable = true;
|
||||
clean.extraArgs = "--keep-since 4d --keep 3";
|
||||
|
||||
flake = "/home/wizardlink/.system";
|
||||
};
|
||||
|
||||
# Optimize storage
|
||||
|
|
12
switch
12
switch
|
@ -1,12 +0,0 @@
|
|||
#!/etc/profiles/per-user/wizardlink/bin/fish
|
||||
|
||||
function build
|
||||
sudo nixos-rebuild switch --flake ~/.system\#nixos $argv[1]
|
||||
end
|
||||
|
||||
if test "--fast" = "$argv[1]"
|
||||
build --fast
|
||||
else
|
||||
build
|
||||
end
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue