forked from DGNum/infrastructure
feat(shell): Add list-nodes script
This commit is contained in:
parent
780e5ce606
commit
3ad40c734f
3 changed files with 12 additions and 0 deletions
|
@ -59,6 +59,11 @@ let
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
nodes =
|
||||||
|
pkgs.lib.concatMapAttrs
|
||||||
|
(site: builtins.foldl' (acc: host: acc // { ${host} = "${host}.${site}.infra.dgnum.eu"; }) { })
|
||||||
|
(import ./meta/infrastructure.nix);
|
||||||
|
|
||||||
shells = {
|
shells = {
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
name = "dgnum-infra";
|
name = "dgnum-infra";
|
||||||
|
|
|
@ -31,6 +31,7 @@ let
|
||||||
scripts = [
|
scripts = [
|
||||||
"check-deployment"
|
"check-deployment"
|
||||||
"launch-vm"
|
"launch-vm"
|
||||||
|
"list-nodes"
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
6
scripts/list-nodes.sh
Normal file
6
scripts/list-nodes.sh
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#!@bash@/bin/bash
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
|
cd $(@git@/bin/git rev-parse --show-toplevel)
|
||||||
|
|
||||||
|
nix-instantiate --strict --eval --json -A nodes | @jq@/bin/jq .
|
Loading…
Reference in a new issue