feat: update system, simplify nixos-related commands

This commit is contained in:
Ryan Yin
2024-01-11 13:30:33 +08:00
parent 08d834d05d
commit b1a2957837
4 changed files with 33 additions and 6 deletions

View File

@@ -23,18 +23,28 @@ deploy:
debug:
nixos-rebuild switch --flake . --use-remote-sudo --show-trace --verbose
update:
up:
nix flake update
# Update specific input
# usage: make upp i=home-manager
upp:
nix flake lock --update-input $(i)
history:
nix profile history --profile /nix/var/nix/profiles/system
gc:
repl:
nix repl -f flake:nixpkgs
clean:
# remove all generations older than 7 days
sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 7d
gc:
# garbage collect all unused nix store entries
sudo nix store gc --debug
sudo nix-collect-garbage --delete-old
############################################################################
#