-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
30 lines (22 loc) · 888 Bytes
/
justfile
File metadata and controls
30 lines (22 loc) · 888 Bytes
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
alias s := switch
alias d := deploy
check:
nix flake check
switch *args:
bash switch.sh {{ justfile_directory() }} {{args}}
rollback:
sudo nixos-rebuild switch --rollback
boot *args:
sudo nixos-rebuild boot --flake {{ justfile_directory() }} --keep-going {{args}}
deploy system *args:
#!/usr/bin/env bash
set -euo pipefail
flake=$(nix eval --impure --raw --expr "(builtins.getFlake \"git+file://$PWD\").outPath")
nix copy "$flake" --to "ssh://{{system}}"
ssh -t "{{system}}" "bash $flake/switch.sh $flake {{args}}"
lint *args:
statix check -i flake.nix **/hardware-configuration.nix {{args}}
eval system *args:
nix eval .#nixosConfigurations.{{system}}.config.system.build.toplevel {{args}}
eval-all *args:
nix eval .#nixosConfigurations --apply 'builtins.mapAttrs (name: cfg: builtins.trace name cfg.config.system.build.toplevel)'