pass flake path as first argument
This commit is contained in:
parent
3ef331d57e
commit
686885f784
2 changed files with 5 additions and 6 deletions
6
justfile
6
justfile
|
@ -5,20 +5,20 @@ check:
|
|||
nix flake check
|
||||
|
||||
switch *args:
|
||||
bash switch.sh {{args}}
|
||||
bash switch.sh {{ justfile_directory() }} {{args}}
|
||||
|
||||
rollback:
|
||||
sudo nixos-rebuild switch --rollback
|
||||
|
||||
boot *args:
|
||||
sudo nixos-rebuild boot --flake . --keep-going {{args}}
|
||||
sudo nixos-rebuild boot --flake {{ justfile_directory() }} --keep-going {{args}}
|
||||
|
||||
deploy system user="leo":
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
flake=$(nix eval --impure --raw --expr "(builtins.getFlake \"git+file://$PWD\").outPath")
|
||||
nix copy "$flake" --to "ssh://{{user}}@{{system}}"
|
||||
ssh -t "{{user}}@{{system}}" "bash $flake/switch.sh"
|
||||
ssh -t "{{user}}@{{system}}" "bash $flake/switch.sh $flake"
|
||||
|
||||
lint *args:
|
||||
statix check -i flake.nix **/hardware-configuration.nix {{args}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue