This repository has been archived on 2023-07-23. You can view files and clone it, but cannot push or open issues or pull requests.
gpd-configurations/Makefile

26 lines
688 B
Makefile
Raw Permalink Normal View History

2023-06-28 08:06:17 +00:00
############################################################################
#
# 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:
2023-06-28 23:21:20 +00:00
nix flake update
2023-06-28 08:06:17 +00:00
history:
2023-06-28 23:21:20 +00:00
nix profile history --profile /nix/var/nix/profiles/system
2023-06-28 08:06:17 +00:00
gc:
# remove all generations older than 7 days
2023-06-28 23:21:20 +00:00
sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 3d
2023-06-28 08:06:17 +00:00
# garbage collect all unused nix store entries
2023-06-28 23:21:20 +00:00
sudo nix store gc --debug
2023-06-28 23:14:31 +00:00
nix-collect-garbage -d