mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 20:09:07 +01:00
Add external host support
This commit is contained in:
parent
f93908d157
commit
28e704ceff
11 changed files with 31 additions and 21 deletions
|
|
@ -9,7 +9,7 @@ pkgs.writeShellApplication {
|
|||
];
|
||||
|
||||
text = ''
|
||||
hosts="$(nix eval .#nixosConfigurations --apply 'builtins.attrNames' --json | jq -r '.[]')"
|
||||
hosts="$(nix eval .#allHosts --apply 'builtins.attrNames' --json | jq -r '.[]')"
|
||||
|
||||
if ! declare -px BW_SESSION >/dev/null 2>&1; then
|
||||
BW_SESSION="$(bw unlock --raw || bw login --raw)"
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@ pkgs.writeShellApplication {
|
|||
fi
|
||||
|
||||
host="$1"
|
||||
address="$(nix eval --raw ".#nixosConfigurations.$host.config.custom.networking.overlay.cidr")"
|
||||
groups="$(nix eval --raw ".#nixosConfigurations.$host.config.custom.services.nebula.groups" --apply 'builtins.concatStringsSep ","')"
|
||||
address="$(nix eval --raw ".#allHosts.$host.config.custom.networking.overlay.cidr")"
|
||||
groups="$(nix eval --raw ".#allHosts.$host.config.custom.services.nebula.groups" --apply 'builtins.concatStringsSep ","')"
|
||||
ca_cert='modules/system/services/nebula/ca.crt'
|
||||
host_pub="$(nix eval --raw ".#nixosConfigurations.$host.config.custom.services.nebula.publicKeyPath")"
|
||||
host_cert="$(nix eval --raw ".#nixosConfigurations.$host.config.custom.services.nebula.certificatePath")"
|
||||
host_pub="$(nix eval --raw ".#allHosts.$host.config.custom.services.nebula.publicKeyPath")"
|
||||
host_cert="$(nix eval --raw ".#allHosts.$host.config.custom.services.nebula.certificatePath")"
|
||||
host_cert="''${host_cert#*-source/}"
|
||||
|
||||
if [[ $# -eq 2 ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue