feat(just): deployAll recipe
This commit is contained in:
parent
87753fa69f
commit
3a6f72aa84
1 changed files with 20 additions and 0 deletions
20
Justfile
20
Justfile
|
@ -25,6 +25,26 @@ deployRemoteOs host:
|
||||||
--target-host root@{{host}} \
|
--target-host root@{{host}} \
|
||||||
--verbose --log-format internal-json |& nom --json
|
--verbose --log-format internal-json |& nom --json
|
||||||
|
|
||||||
|
[group('nixos')]
|
||||||
|
deployAll:
|
||||||
|
#!/usr/bin/env fish
|
||||||
|
set -l systems (nix flake show --all-systems --json \
|
||||||
|
| jq '.nixosConfigurations | keys[]' \
|
||||||
|
# Remove literal quotes from values so that contains works.
|
||||||
|
| string trim --chars \"\'\")
|
||||||
|
|
||||||
|
# Remove the current system.
|
||||||
|
set -l currentSysI (contains --index (hostname) $systems)
|
||||||
|
if set -q currentSysI[1]
|
||||||
|
set -e systems[$currentSysI]
|
||||||
|
end
|
||||||
|
|
||||||
|
just deployos
|
||||||
|
|
||||||
|
for system in $systems
|
||||||
|
just deployRemoteOs $system
|
||||||
|
end
|
||||||
|
|
||||||
alias dd := deploydarwin
|
alias dd := deploydarwin
|
||||||
[group('darwin')]
|
[group('darwin')]
|
||||||
deploydarwin host=defhost:
|
deploydarwin host=defhost:
|
||||||
|
|
Loading…
Reference in a new issue