diff --git a/lib/jsonschema/example-interface.nix b/lib/jsonschema/example-interface.nix index 1370d3cd9..4a8cfe702 100644 --- a/lib/jsonschema/example-interface.nix +++ b/lib/jsonschema/example-interface.nix @@ -3,16 +3,19 @@ */ { lib, ... }: { options = { + # str name = lib.mkOption { type = lib.types.str; default = "John Doe"; description = "The name of the user"; }; + # int age = lib.mkOption { type = lib.types.int; default = 42; description = "The age of the user"; }; + # bool isAdmin = lib.mkOption { type = lib.types.bool; default = false; @@ -28,6 +31,7 @@ }; }; }; + # attrs of int userIds = lib.mkOption { type = lib.types.attrsOf lib.types.int; description = "Some attributes"; @@ -37,6 +41,7 @@ albrecht = 3; }; }; + # list of str kernelModules = lib.mkOption { type = lib.types.listOf lib.types.str; default = [ "nvme" "xhci_pci" "ahci" ]; diff --git a/nixosModules/clanCore/bloatware/default.nix b/nixosModules/clanCore/bloatware/default.nix new file mode 100644 index 000000000..0c85221f6 --- /dev/null +++ b/nixosModules/clanCore/bloatware/default.nix @@ -0,0 +1,9 @@ +{ lib, ... }: { + options.clan.bloatware = lib.mkOption { + type = lib.types.submodule { + imports = [ + ../../../lib/jsonschema/example-interface.nix + ]; + }; + }; +} diff --git a/nixosModules/clanCore/flake-module.nix b/nixosModules/clanCore/flake-module.nix index 437f54874..da174fff9 100644 --- a/nixosModules/clanCore/flake-module.nix +++ b/nixosModules/clanCore/flake-module.nix @@ -4,6 +4,8 @@ ./secrets ./zerotier.nix inputs.sops-nix.nixosModules.sops + # just some example options. Can be removed later + ./bloatware ]; options.clanSchema = lib.mkOption { type = lib.types.attrs;