mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-10 23:00:39 +02:00
feat: introduce shared global variable aggregator with recursive redistribution
This commit is contained in:
parent
cceae6c63c
commit
cbd22db8c0
4 changed files with 67 additions and 1 deletions
|
@ -9,6 +9,7 @@
|
|||
./backups.nix
|
||||
./deterministic-ids.nix
|
||||
./distributed-config.nix
|
||||
./globals.nix
|
||||
./kanidm.nix
|
||||
./meta.nix
|
||||
./netbird-client.nix
|
||||
|
|
46
modules/globals.nix
Normal file
46
modules/globals.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
lib,
|
||||
options,
|
||||
...
|
||||
}: let
|
||||
inherit
|
||||
(lib)
|
||||
mkOption
|
||||
types
|
||||
;
|
||||
in {
|
||||
options = {
|
||||
globals = mkOption {
|
||||
default = {};
|
||||
type = types.submodule {
|
||||
options = {
|
||||
services = mkOption {
|
||||
type = types.attrsOf (types.submodule {
|
||||
options = {
|
||||
domain = mkOption {
|
||||
type = types.str;
|
||||
description = "";
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
#telegrafChecks = mkOption {
|
||||
# type = types.attrsOf (types.submodule {
|
||||
# options = {
|
||||
# domain = mkOption {};
|
||||
# };
|
||||
# });
|
||||
#};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_globalsDefs = mkOption {
|
||||
type = types.unspecified;
|
||||
default = options.globals.definitions;
|
||||
readOnly = true;
|
||||
internal = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue