alpha
Login
or
Join now
lass.pds.lassul.us
/
superconfig
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
1
Pipelines
tools: add get-spora-hosts
author
lassulus
date
2 years ago
(Mar 17, 2024, 8:19 AM CET)
commit
3b25fb79
3b25fb795e69ed07fab97c204027b6a5820f67ff
parent
325fb3e6
325fb3e62ffe3f7a4248f20ed24d7b86fc0e7b60
+19
2 changed files
Expand all
Collapse all
Unified
Split
flake.nix
tools
get-spora-hosts.nix
+1
flake.nix
View file
Reviewed
···
73
73
./tools/astronvim/flake-module.nix
74
74
75
75
./tools/zsh.nix
76
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
View file
Reviewed
···
1
1
+
{ self, ... }:
2
2
+
{
3
3
+
perSystem = { system, pkgs, ... }: {
4
4
+
packages.get-spora-hosts = pkgs.writeScriptBin "get-spora-hosts" ''
5
5
+
set -eu
6
6
+
set -o pipefail
7
7
+
set -x
8
8
+
OUTDIR=$1
9
9
+
for host in ${self}/machines/*; do
10
10
+
if test -e "$host"/facts/mycelium_pubkey; then
11
11
+
if ! test -e "$OUTDIR"/"$(basename "$host")".json; then
12
12
+
${pkgs.mycelium}/bin/mycelium inspect "$(cat "$host"/facts/mycelium_pubkey)" --json > "$OUTDIR/$(basename "$host").json"
13
13
+
fi
14
14
+
fi
15
15
+
done
16
16
+
'';
17
17
+
};
18
18
+
}