justfile (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | user := env("USER", "alin")
hostname := env("HOSTNAME", `hostname`)
export NH_FILE := "."
alias up := update-packages
alias ui := update-inputs
alias ua := update-all
test:
nix flake check --all-systems path:.
build action="switch" *args:
nh home {{ action }} --file . "homeConfigurations.{{ user }}@{{ hostname }}" {{ args }}
[linux]
os-update action="switch" *args:
nh os {{ action }} --file . nixosConfigurations.{{ hostname }} {{ args }}
[macos]
os-update action="switch" *args:
nh darwin {{ action }} --file . darwinConfigurations.{{ hostname }} {{ args }}
run target="" *args:
#!/usr/bin/env fish
switch "{{ target }}"
case {{ hostname }} . ""
just os-update {{ args }}
case '*'
./bin/os_update_remote {{ target }} {{ args }}
end
update-packages:
git submodule update --remote packages
update-inputs:
nix flake update
update-all: update-inputs update-packages
|