refactor: rename utils to lib'
check / lint (push) Successful in 15s

This commit is contained in:
hektor committed 2026-11-06 14:35:01 +01:00
1 parent 1947ee0c9f
commit 6fa74fead8
22 files changed
+116 -144

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
{ lib }:
let
fs = import ./fs.nix { inherit lib; };
hostsPath = ../hosts;
hostMeta =
host:
let
metaPath = hostsPath + "/${host}/meta.nix";
in
if builtins.pathExists metaPath then
import metaPath
else
throw "meta.nix required in ${toString metaPath}";
hostNames = fs.dirNames hostsPath;
in
{
inherit hostsPath hostMeta hostNames;
adminHosts = builtins.filter (host: (hostMeta host).host.admin or false) hostNames;
nixosHosts = hostNames;
}