Add Makefile to manage commands
This commit is contained in:
parent
4905c5763c
commit
f79ec7e060
26
Makefile
Normal file
26
Makefile
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
.PHONY: upgrade update switch home clean gc home history repl
|
||||||
|
|
||||||
|
upgrade: update home switch
|
||||||
|
|
||||||
|
update:
|
||||||
|
@nix flake update
|
||||||
|
|
||||||
|
switch:
|
||||||
|
@sudo nixos-rebuild switch --flake .
|
||||||
|
|
||||||
|
home:
|
||||||
|
@home-manager switch --flake .
|
||||||
|
|
||||||
|
clean:
|
||||||
|
# remove all generations older than 30 days
|
||||||
|
@sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 30d
|
||||||
|
|
||||||
|
gc:
|
||||||
|
# garbage collect all unused nix store entries
|
||||||
|
@sudo nix-collect-garbage --delete-old
|
||||||
|
|
||||||
|
history:
|
||||||
|
@nix profile history --profile /nix/var/nix/profiles/system
|
||||||
|
|
||||||
|
repl:
|
||||||
|
@nix repl -f flake:nixpkgs
|
Loading…
x
Reference in New Issue
Block a user