From 1f02be1fd500530570a99f49ba0702d91853a577 Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Tue, 29 Oct 2024 16:03:12 -0700 Subject: [PATCH] #18 Implement much faster `nix-instantiate`-based parsing. Trigger workflow. --- .gitea/workflows/silver-flame-deploy.yaml | 8 ++++++-- homelab/local-hosts/silver-flame/configuration.nix | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/silver-flame-deploy.yaml b/.gitea/workflows/silver-flame-deploy.yaml index 8954703f..fd43c97f 100644 --- a/.gitea/workflows/silver-flame-deploy.yaml +++ b/.gitea/workflows/silver-flame-deploy.yaml @@ -35,8 +35,12 @@ jobs: chmod 600 /tmp/key - name: Derive host IPs run: | - nix eval --json .#deploy.nodes --apply 'builtins.attrValues' |\ - jq -r '.[].hostname' | xargs echo > /tmp/hostlist + nix-shell -p nixfmt-rfc-style + nix-instantiate --parse flake.nix |\ + nixfmt |\ + grep 'hostname =' |\ + cut -d'"' -f2 |\ + xargs echo > /tmp/hostlist - name: Add host keys to known_hosts run: | mkdir -p ~/.ssh && touch ~/.ssh/known_hosts && chmod 600 ~/.ssh/known_hosts diff --git a/homelab/local-hosts/silver-flame/configuration.nix b/homelab/local-hosts/silver-flame/configuration.nix index 0c188b68..09b01734 100644 --- a/homelab/local-hosts/silver-flame/configuration.nix +++ b/homelab/local-hosts/silver-flame/configuration.nix @@ -33,7 +33,7 @@ clusterInit = (hostConf.name == "bard"); serverAddr = (if hostConf.name == "bard" then "" else "https://192.168.1.31:6443"); # We are going to manage k8s resources separately from the infrastructure config - manifests = { }; + manifests = { }; }; services.openiscsi = { enable = false;