This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

tools: add get-spora-hosts

+19
+1
flake.nix
··· 73 73 ./tools/astronvim/flake-module.nix 74 74 75 75 ./tools/zsh.nix 76 + ./tools/get-spora-hosts.nix 76 77 ]; 77 78 flake.nixosConfigurations = clan.nixosConfigurations; 78 79 flake.clanInternals = clan.clanInternals;
+18
tools/get-spora-hosts.nix
··· 1 + { self, ... }: 2 + { 3 + perSystem = { system, pkgs, ... }: { 4 + packages.get-spora-hosts = pkgs.writeScriptBin "get-spora-hosts" '' 5 + set -eu 6 + set -o pipefail 7 + set -x 8 + OUTDIR=$1 9 + for host in ${self}/machines/*; do 10 + if test -e "$host"/facts/mycelium_pubkey; then 11 + if ! test -e "$OUTDIR"/"$(basename "$host")".json; then 12 + ${pkgs.mycelium}/bin/mycelium inspect "$(cat "$host"/facts/mycelium_pubkey)" --json > "$OUTDIR/$(basename "$host").json" 13 + fi 14 + fi 15 + done 16 + ''; 17 + }; 18 + }