refactor: use terminal package attr paths with shared resolver

This commit is contained in:
2026-04-21 22:48:00 +02:00
parent 4781cc60be
commit 8de3bc1b72
7 changed files with 61 additions and 49 deletions
+15
View File
@@ -56,6 +56,13 @@ let
'';
};
resolvePackagePath =
{
pkgs,
path,
}:
lib.attrByPath path null pkgs;
mkHostUser =
{
account,
@@ -136,6 +143,13 @@ in
readOnly = true;
};
options.meta.lib.resolvePackagePath = lib.mkOption {
type = lib.types.raw;
description = "Internal helper to resolve package attr paths against the local pkgs set.";
internal = true;
readOnly = true;
};
options.meta.lib.users = lib.mkOption {
type = lib.types.attrs;
description = "Canonical user attrsets shared by host definitions.";
@@ -148,6 +162,7 @@ in
mkCaddyReverseProxy
mkHost
mkHostUser
resolvePackagePath
;
};
}