mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-10 04:49:19 -08:00
feat: extern nixosModules
This commit is contained in:
parent
cb932b65cc
commit
0116ecf47f
14 changed files with 690 additions and 2 deletions
27
modules/extern/misc/args.nix
vendored
Normal file
27
modules/extern/misc/args.nix
vendored
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue