26 lines
856 B
Makefile
26 lines
856 B
Makefile
############################################################################
|
|
#
|
|
# Nix commands related to the local machine
|
|
#
|
|
############################################################################
|
|
|
|
deploy:
|
|
nixos-rebuild switch --flake '.#gpd' --use-remote-sudo
|
|
|
|
debug:
|
|
nixos-rebuild switch --flake '.#gpd' --use-remote-sudo --show-trace --verbose
|
|
|
|
update:
|
|
nix flake update --extra-experimental-features nix-command
|
|
|
|
history:
|
|
nix profile history --profile /nix/var/nix/profiles/system --extra-experimental-features nix-command
|
|
|
|
gc:
|
|
# remove all generations older than 7 days
|
|
sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 3d --extra-experimental-features nix-command
|
|
|
|
# garbage collect all unused nix store entries
|
|
sudo nix store gc --debug --extra-experimental-features nix-command
|
|
nix-collect-garbage -d
|