feat: extern nixosModules

This commit is contained in:
arcnmx 2024-02-19 11:29:46 -08:00
parent cb932b65cc
commit 0116ecf47f
14 changed files with 690 additions and 2 deletions

27
modules/extern/misc/args.nix vendored Normal file
View file

@ -0,0 +1,27 @@
{inputs, ...}: {
config,
options,
...
}: let
hasConfigLib = options ? lib;
gensokyo-zone = {
inherit inputs;
inherit (inputs.self.lib) tree meta lib;
};
in {
config = {
${
if hasConfigLib
then "lib"
else null
} = {
inherit gensokyo-zone;
};
_module.args = {
gensokyo-zone =
if hasConfigLib
then config.lib.gensokyo-zone
else gensokyo-zone;
};
};
}