1
1
Fork 1
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:
oddlama 2024-05-27 01:28:07 +02:00
parent cceae6c63c
commit cbd22db8c0
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
4 changed files with 67 additions and 1 deletions

View file

@ -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
View 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;
};
};
}