Initial commit

This commit is contained in:
kirbara 2025-12-01 13:23:24 +07:00
commit cfcc57a8bd
Signed by: exp
GPG key ID: D7E63AD0019E75D9
353 changed files with 18756 additions and 0 deletions

View file

@ -0,0 +1,97 @@
{
den,
lib,
...
}:
let
inherit (den.lib)
owned
statics
parametric
;
inherit (den.lib.take) exactly;
dependencies = [
(exactly osDependencies)
(exactly hmUserDependencies)
(exactly hmStandaloneDependencies)
];
osDependencies =
{ OS, host }:
{
includes = [
(owned den.default)
(statics den.default)
(owned OS)
(statics OS)
{
includes =
let
users = builtins.attrValues host.users;
contrib = osUserDependencies { inherit OS host; };
in
map contrib users;
}
];
};
osUserDependencies =
{ OS, host }:
user:
let
USR = den.aspects.${user.aspect};
in
{
includes = [
(owned USR)
(statics USR)
(USR { inherit OS host user; })
];
};
# from OS home-managed integration.
hmUserDependencies =
{
OS-HM,
host,
user,
}:
let
inherit (OS-HM) OS HM;
in
{
includes = [
(owned den.default)
(statics den.default)
(owned HM)
(statics HM)
(owned OS)
(statics OS)
(parametric {
inherit
OS
HM
user
host
;
} OS)
];
};
hmStandaloneDependencies =
{ HM, home }:
{
includes = [
(owned den.default)
(statics den.default)
(owned HM)
(statics HM)
];
};
in
{
den.default.includes = dependencies;
}