clanCore: add example options
This commit is contained in:
@@ -3,16 +3,19 @@
|
|||||||
*/
|
*/
|
||||||
{ lib, ... }: {
|
{ lib, ... }: {
|
||||||
options = {
|
options = {
|
||||||
|
# str
|
||||||
name = lib.mkOption {
|
name = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "John Doe";
|
default = "John Doe";
|
||||||
description = "The name of the user";
|
description = "The name of the user";
|
||||||
};
|
};
|
||||||
|
# int
|
||||||
age = lib.mkOption {
|
age = lib.mkOption {
|
||||||
type = lib.types.int;
|
type = lib.types.int;
|
||||||
default = 42;
|
default = 42;
|
||||||
description = "The age of the user";
|
description = "The age of the user";
|
||||||
};
|
};
|
||||||
|
# bool
|
||||||
isAdmin = lib.mkOption {
|
isAdmin = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
@@ -28,6 +31,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
# attrs of int
|
||||||
userIds = lib.mkOption {
|
userIds = lib.mkOption {
|
||||||
type = lib.types.attrsOf lib.types.int;
|
type = lib.types.attrsOf lib.types.int;
|
||||||
description = "Some attributes";
|
description = "Some attributes";
|
||||||
@@ -37,6 +41,7 @@
|
|||||||
albrecht = 3;
|
albrecht = 3;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
# list of str
|
||||||
kernelModules = lib.mkOption {
|
kernelModules = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
default = [ "nvme" "xhci_pci" "ahci" ];
|
default = [ "nvme" "xhci_pci" "ahci" ];
|
||||||
|
|||||||
9
nixosModules/clanCore/bloatware/default.nix
Normal file
9
nixosModules/clanCore/bloatware/default.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{ lib, ... }: {
|
||||||
|
options.clan.bloatware = lib.mkOption {
|
||||||
|
type = lib.types.submodule {
|
||||||
|
imports = [
|
||||||
|
../../../lib/jsonschema/example-interface.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -4,6 +4,8 @@
|
|||||||
./secrets
|
./secrets
|
||||||
./zerotier.nix
|
./zerotier.nix
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
# just some example options. Can be removed later
|
||||||
|
./bloatware
|
||||||
];
|
];
|
||||||
options.clanSchema = lib.mkOption {
|
options.clanSchema = lib.mkOption {
|
||||||
type = lib.types.attrs;
|
type = lib.types.attrs;
|
||||||
|
|||||||
Reference in New Issue
Block a user