From 15f5d6096d8a686af48766db6f37cbcc93e8d434 Mon Sep 17 00:00:00 2001 From: Alexander Tomokhov Date: Thu, 28 Dec 2023 12:54:59 +0400 Subject: [PATCH] sp-modules: refactor options types --- sp-modules/bitwarden/module.nix | 5 ++--- sp-modules/gitea/module.nix | 5 ++--- sp-modules/jitsi-meet/module.nix | 2 +- sp-modules/nextcloud/module.nix | 5 ++--- sp-modules/ocserv/module.nix | 2 +- sp-modules/pleroma/module.nix | 5 ++--- sp-modules/simple-nixos-mailserver/options.nix | 5 ++--- 7 files changed, 12 insertions(+), 17 deletions(-) diff --git a/sp-modules/bitwarden/module.nix b/sp-modules/bitwarden/module.nix index d549366..5bd22f5 100644 --- a/sp-modules/bitwarden/module.nix +++ b/sp-modules/bitwarden/module.nix @@ -8,11 +8,10 @@ in options.selfprivacy.modules.bitwarden = { enable = lib.mkOption { default = false; - type = with lib.types; nullOr bool; + type = lib.types.bool; }; location = lib.mkOption { - default = "sda1"; - type = with lib.types; nullOr str; + type = lib.types.str; }; }; diff --git a/sp-modules/gitea/module.nix b/sp-modules/gitea/module.nix index 73aaea0..c076a8c 100644 --- a/sp-modules/gitea/module.nix +++ b/sp-modules/gitea/module.nix @@ -10,11 +10,10 @@ in options.selfprivacy.modules.gitea = { enable = lib.mkOption { default = false; - type = with lib.types; nullOr bool; + type = lib.types.bool; }; location = lib.mkOption { - default = "sda1"; - type = with lib.types; nullOr str; + type = lib.types.str; }; }; diff --git a/sp-modules/jitsi-meet/module.nix b/sp-modules/jitsi-meet/module.nix index 6fd7a69..57957e9 100644 --- a/sp-modules/jitsi-meet/module.nix +++ b/sp-modules/jitsi-meet/module.nix @@ -6,7 +6,7 @@ in options.selfprivacy.modules.jitsi-meet = { enable = lib.mkOption { default = false; - type = with lib.types; nullOr bool; + type = lib.types.bool; }; }; diff --git a/sp-modules/nextcloud/module.nix b/sp-modules/nextcloud/module.nix index 845c435..8fbedb3 100644 --- a/sp-modules/nextcloud/module.nix +++ b/sp-modules/nextcloud/module.nix @@ -2,12 +2,11 @@ { options.selfprivacy.modules.nextcloud = with lib; { enable = mkOption { - type = types.nullOr types.bool; + type = types.bool; default = false; }; location = mkOption { - type = types.nullOr types.str; - default = "sda1"; + type = types.str; }; }; diff --git a/sp-modules/ocserv/module.nix b/sp-modules/ocserv/module.nix index dfb7318..fc52c54 100644 --- a/sp-modules/ocserv/module.nix +++ b/sp-modules/ocserv/module.nix @@ -8,7 +8,7 @@ in options.selfprivacy.modules.ocserv = { enable = lib.mkOption { default = false; - type = with lib; types.nullOr types.bool; + type = lib.types.bool; }; }; diff --git a/sp-modules/pleroma/module.nix b/sp-modules/pleroma/module.nix index ef5296f..d69534f 100644 --- a/sp-modules/pleroma/module.nix +++ b/sp-modules/pleroma/module.nix @@ -7,11 +7,10 @@ in options.selfprivacy.modules.pleroma = { enable = lib.mkOption { default = false; - type = with lib; types.nullOr types.bool; + type = lib.types.bool; }; location = lib.mkOption { - default = "sda1"; - type = with lib; types.nullOr types.str; + type = lib.types.str; }; }; config = lib.mkIf config.selfprivacy.modules.pleroma.enable { diff --git a/sp-modules/simple-nixos-mailserver/options.nix b/sp-modules/simple-nixos-mailserver/options.nix index 0f83abe..c6f6d3a 100644 --- a/sp-modules/simple-nixos-mailserver/options.nix +++ b/sp-modules/simple-nixos-mailserver/options.nix @@ -3,11 +3,10 @@ options.selfprivacy.modules.simple-nixos-mailserver = { enable = lib.mkOption { default = false; - type = with lib.types; nullOr bool; + type = lib.types.bool; }; location = lib.mkOption { - default = "sda1"; - type = with lib.types; nullOr str; + type = lib.types.str; }; }; }