mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2025-08-18 16:38:16 +02:00
feat: update system, simplify nixos-related commands
This commit is contained in:
@@ -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
|
||||
|
||||
############################################################################
|
||||
#
|
||||
|
Reference in New Issue
Block a user