-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjustfile
53 lines (45 loc) · 1.38 KB
/
justfile
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
alias r := rebuild
alias rr := remote-rebuild
alias e := eval
alias ea := eval-all
alias u := update
alias ui := update-input
rebuild := if os() == "macos" { "darwin-rebuild" } else { "nixos-rebuild" }
default:
@just --choose
rebuild subcmd *args="":
{{ rebuild }} \
{{ subcmd }} \
--use-remote-sudo \
--flake 'git+file://{{ justfile_directory() }}' \
{{ args }}
remote-rebuild system subcmd *args="":
{{ rebuild }} \
{{ subcmd }} \
--build-host 'root@{{ system }}' \
--target-host 'root@{{ system }}' \
--fast \
--use-substitutes \
--flake 'git+file://{{ justfile_directory() }}#{{ system }}' \
{{ args }}
eval system *args="":
nix eval \
--no-allow-import-from-derivation \
'git+file://{{ justfile_directory() }}#nixosConfigurations.{{ system }}.config.system.build.toplevel' \
{{ args }}
eval-all *args="":
nix flake check \
--all-systems \
--no-build \
'git+file://{{ justfile_directory() }}' \
{{ args }}
update:
nix flake update \
--commit-lock-file \
--commit-lockfile-summary "flake: update all inputs" \
--flake 'git+file://{{ justfile_directory() }}'
update-input input:
nix flake update {{ input }} \
--commit-lock-file \
--commit-lockfile-summary "flake: update {{ input }}" \
--flake 'git+file://{{ justfile_directory() }}'