diff --git a/Justfile b/Justfile index 341e1fa..04089d0 100644 --- a/Justfile +++ b/Justfile @@ -25,6 +25,26 @@ deployRemoteOs host: --target-host root@{{host}} \ --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 [group('darwin')] deploydarwin host=defhost: