sp-modules: refactor options types

pull/55/head
Alexander 2023-12-28 12:54:59 +04:00
parent a32613ece4
commit 15f5d6096d
7 changed files with 12 additions and 17 deletions

View File

@ -8,11 +8,10 @@ in
options.selfprivacy.modules.bitwarden = { options.selfprivacy.modules.bitwarden = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
type = with lib.types; nullOr bool; type = lib.types.bool;
}; };
location = lib.mkOption { location = lib.mkOption {
default = "sda1"; type = lib.types.str;
type = with lib.types; nullOr str;
}; };
}; };

View File

@ -10,11 +10,10 @@ in
options.selfprivacy.modules.gitea = { options.selfprivacy.modules.gitea = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
type = with lib.types; nullOr bool; type = lib.types.bool;
}; };
location = lib.mkOption { location = lib.mkOption {
default = "sda1"; type = lib.types.str;
type = with lib.types; nullOr str;
}; };
}; };

View File

@ -6,7 +6,7 @@ in
options.selfprivacy.modules.jitsi-meet = { options.selfprivacy.modules.jitsi-meet = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
type = with lib.types; nullOr bool; type = lib.types.bool;
}; };
}; };

View File

@ -2,12 +2,11 @@
{ {
options.selfprivacy.modules.nextcloud = with lib; { options.selfprivacy.modules.nextcloud = with lib; {
enable = mkOption { enable = mkOption {
type = types.nullOr types.bool; type = types.bool;
default = false; default = false;
}; };
location = mkOption { location = mkOption {
type = types.nullOr types.str; type = types.str;
default = "sda1";
}; };
}; };

View File

@ -8,7 +8,7 @@ in
options.selfprivacy.modules.ocserv = { options.selfprivacy.modules.ocserv = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
type = with lib; types.nullOr types.bool; type = lib.types.bool;
}; };
}; };

View File

@ -7,11 +7,10 @@ in
options.selfprivacy.modules.pleroma = { options.selfprivacy.modules.pleroma = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
type = with lib; types.nullOr types.bool; type = lib.types.bool;
}; };
location = lib.mkOption { location = lib.mkOption {
default = "sda1"; type = lib.types.str;
type = with lib; types.nullOr types.str;
}; };
}; };
config = lib.mkIf config.selfprivacy.modules.pleroma.enable { config = lib.mkIf config.selfprivacy.modules.pleroma.enable {

View File

@ -3,11 +3,10 @@
options.selfprivacy.modules.simple-nixos-mailserver = { options.selfprivacy.modules.simple-nixos-mailserver = {
enable = lib.mkOption { enable = lib.mkOption {
default = false; default = false;
type = with lib.types; nullOr bool; type = lib.types.bool;
}; };
location = lib.mkOption { location = lib.mkOption {
default = "sda1"; type = lib.types.str;
type = with lib.types; nullOr str;
}; };
}; };
} }