refactor: use terminal package attr paths with shared resolver
This commit is contained in:
@@ -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
|
||||
;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user