From b18450b549ee230646efff366bd248dc9edffb71 Mon Sep 17 00:00:00 2001 From: Sense T Date: Wed, 28 Jun 2023 16:06:17 +0800 Subject: [PATCH] make it easier --- Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0e290ee --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +############################################################################ +# +# 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 + +history: + nix profile history --profile /nix/var/nix/profiles/system + +gc: + # remove all generations older than 7 days + sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 7d + + # garbage collect all unused nix store entries + sudo nix store gc --debug