From 96b9a9b032b4b2b2ea24cff7d3eaf957467338e2 Mon Sep 17 00:00:00 2001 From: Soispha Peetz Date: Sat, 14 Nov 2026 17:56:33 +0100 Subject: scripts/system_info.sh: Adapt to new `hosts/` fs schema --- scripts/system_info.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts/system_info.sh') diff --git a/scripts/system_info.sh b/scripts/system_info.sh index 940406a..f0de42b 100755 --- a/scripts/system_info.sh +++ b/scripts/system_info.sh @@ -1,5 +1,7 @@ #!/usr/bin/env sh +root="$(git rev-parse --show-toplevel)" + # Take a host name and return the nix store path to the host's system info. # Type # _system_info :: String -> Path @@ -17,7 +19,8 @@ _glow() { # The expression is not meant to be expanded by the shell # shellcheck disable=SC2016 -nix eval --expr '"${builtins.concatStringsSep "\n" (builtins.attrNames (builtins.fromTOML (builtins.readFile ./hosts/host-names.toml)))}\n"' --impure --raw | while read -r host; do +fd . "$root/hosts/by-name" --type directory --max-depth 1 | while read -r host_path; do + host="$(basename "$host_path")" echo "# $host" | _glow _glow <"$(_system_info "$host")" done -- cgit v1.3.1