nixos/Justfile

27 lines
632 B
Makefile
Raw Normal View History

FLAKE_HOME := justfile_directory()
2025-01-24 21:29:55 +08:00
DEFAULT_SPECIALISATION := "default"
default:
@just --list
2025-01-24 21:29:55 +08:00
switch specialisation=DEFAULT_SPECIALISATION:
nh os switch {{ FLAKE_HOME }} {{ if specialisation == DEFAULT_SPECIALISATION { "-S" } else { "-s " + specialisation } }}
update:
nix flake update --log-format internal-json 2>&1 | nom --json
deploy host:
deploy {{ FLAKE_HOME }}#{{ host }}
2025-02-02 12:01:24 +08:00
clean keep_since="1w":
nh clean all --verbose -K {{ keep_since }} -k 5
2025-02-02 11:54:15 +08:00
2025-02-02 19:32:55 +08:00
health:
nix --accept-flake-config run github:juspay/nix-health
alias s := switch
alias u := update
alias d := deploy
2025-02-02 11:54:15 +08:00
alias c := clean
2025-02-02 19:32:55 +08:00
alias h := health