Add justfile

This commit is contained in:
Oliver Davies 2025-04-06 22:57:46 +01:00
parent a8fff66029
commit 877845ad1a
4 changed files with 38 additions and 63 deletions

36
justfile Normal file
View file

@ -0,0 +1,36 @@
alias b := build
alias s := switch
alias t := test
alias u := update
_default:
just --list
build *args:
@just _nixos build {{ args }}
check:
nix flake check
clean:
nix store optimise --verbose
nix store gc --verbose
collect-garbage:
nix-collect-garbage -d
sudo nix-collect-garbage -d
format:
nix fmt flake.nix hosts modules
switch *args:
@just _nixos switch {{ args }}
test *args:
@just _nixos test {{ args }}
update:
nix flake update
_nixos command *args:
sudo nixos-rebuild {{ command }} --flake . {{ args }}