From 74fadae9421bf39b740c5c6a5fe26e7667627840 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Tue, 8 Aug 2023 20:45:53 +0800 Subject: [PATCH] treewide: stop using types.string It is an error[1] now. [1]: https://github.com/NixOS/nixpkgs/pull/247848 --- nixos/modules/i18n/input-method/fcitx5.nix | 2 +- nixos/modules/programs/firefox.nix | 2 +- nixos/modules/programs/gamescope.nix | 4 ++-- nixos/modules/programs/steam.nix | 4 ++-- nixos/modules/security/ipa.nix | 2 +- nixos/modules/security/pam.nix | 2 +- nixos/modules/services/cluster/patroni/default.nix | 2 +- nixos/modules/services/hardware/keyd.nix | 2 +- nixos/modules/services/mail/maddy.nix | 8 ++++---- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/nixos/modules/i18n/input-method/fcitx5.nix b/nixos/modules/i18n/input-method/fcitx5.nix index 39952d6c3999..b72f4be9b57a 100644 --- a/nixos/modules/i18n/input-method/fcitx5.nix +++ b/nixos/modules/i18n/input-method/fcitx5.nix @@ -19,7 +19,7 @@ in ''; }; quickPhrase = mkOption { - type = with types; attrsOf string; + type = with types; attrsOf str; default = { }; example = literalExpression '' { diff --git a/nixos/modules/programs/firefox.nix b/nixos/modules/programs/firefox.nix index d67bbee9a761..8653f066cf8f 100644 --- a/nixos/modules/programs/firefox.nix +++ b/nixos/modules/programs/firefox.nix @@ -53,7 +53,7 @@ in }; preferences = mkOption { - type = with types; attrsOf (oneOf [ bool int string ]); + type = with types; attrsOf (oneOf [ bool int str ]); default = { }; description = mdDoc '' Preferences to set from `about:config`. diff --git a/nixos/modules/programs/gamescope.nix b/nixos/modules/programs/gamescope.nix index c4424849a41e..a31295e736df 100644 --- a/nixos/modules/programs/gamescope.nix +++ b/nixos/modules/programs/gamescope.nix @@ -42,7 +42,7 @@ in }; args = mkOption { - type = types.listOf types.string; + type = types.listOf types.str; default = [ ]; example = [ "--rt" "--prefer-vk-device 8086:9bc4" ]; description = mdDoc '' @@ -51,7 +51,7 @@ in }; env = mkOption { - type = types.attrsOf types.string; + type = types.attrsOf types.str; default = { }; example = literalExpression '' # for Prime render offload on Nvidia laptops. diff --git a/nixos/modules/programs/steam.nix b/nixos/modules/programs/steam.nix index c63b31bde11f..29c449c16946 100644 --- a/nixos/modules/programs/steam.nix +++ b/nixos/modules/programs/steam.nix @@ -89,7 +89,7 @@ in { options = { enable = mkEnableOption (mdDoc "GameScope Session"); args = mkOption { - type = types.listOf types.string; + type = types.listOf types.str; default = [ ]; description = mdDoc '' Arguments to be passed to GameScope for the session. @@ -97,7 +97,7 @@ in { }; env = mkOption { - type = types.attrsOf types.string; + type = types.attrsOf types.str; default = { }; description = mdDoc '' Environmental variables to be passed to GameScope for the session. diff --git a/nixos/modules/security/ipa.nix b/nixos/modules/security/ipa.nix index 7075be95040e..69a670cd5e4a 100644 --- a/nixos/modules/security/ipa.nix +++ b/nixos/modules/security/ipa.nix @@ -86,7 +86,7 @@ in { }; ifpAllowedUids = mkOption { - type = types.listOf types.string; + type = types.listOf types.str; default = ["root"]; description = lib.mdDoc "A list of users allowed to access the ifp dbus interface."; }; diff --git a/nixos/modules/security/pam.nix b/nixos/modules/security/pam.nix index ac9da4a823b7..ee260a097c69 100644 --- a/nixos/modules/security/pam.nix +++ b/nixos/modules/security/pam.nix @@ -934,7 +934,7 @@ in }; authserver = mkOption { default = null; - type = with types; nullOr string; + type = with types; nullOr str; description = lib.mdDoc '' This controls the hostname for the 9front authentication server that users will be authenticated against. diff --git a/nixos/modules/services/cluster/patroni/default.nix b/nixos/modules/services/cluster/patroni/default.nix index 9bf3a285836c..5ab016a9f59f 100644 --- a/nixos/modules/services/cluster/patroni/default.nix +++ b/nixos/modules/services/cluster/patroni/default.nix @@ -105,7 +105,7 @@ in }; otherNodesIps = mkOption { - type = types.listOf types.string; + type = types.listOf types.str; example = [ "192.168.1.2" "192.168.1.3" ]; description = mdDoc '' IP addresses of the other nodes. diff --git a/nixos/modules/services/hardware/keyd.nix b/nixos/modules/services/hardware/keyd.nix index 969383fd4dc7..ead2f456a202 100644 --- a/nixos/modules/services/hardware/keyd.nix +++ b/nixos/modules/services/hardware/keyd.nix @@ -7,7 +7,7 @@ let keyboardOptions = { ... }: { options = { ids = mkOption { - type = types.listOf types.string; + type = types.listOf types.str; default = [ "*" ]; example = [ "*" "-0123:0456" ]; description = lib.mdDoc '' diff --git a/nixos/modules/services/mail/maddy.nix b/nixos/modules/services/mail/maddy.nix index 3b4a517fb859..2c4d75e8391a 100644 --- a/nixos/modules/services/mail/maddy.nix +++ b/nixos/modules/services/mail/maddy.nix @@ -142,7 +142,7 @@ in { user = mkOption { default = "maddy"; - type = with types; uniq string; + type = with types; uniq str; description = lib.mdDoc '' User account under which maddy runs. @@ -156,7 +156,7 @@ in { group = mkOption { default = "maddy"; - type = with types; uniq string; + type = with types; uniq str; description = lib.mdDoc '' Group account under which maddy runs. @@ -170,7 +170,7 @@ in { hostname = mkOption { default = "localhost"; - type = with types; uniq string; + type = with types; uniq str; example = ''example.com''; description = lib.mdDoc '' Hostname to use. It should be FQDN. @@ -179,7 +179,7 @@ in { primaryDomain = mkOption { default = "localhost"; - type = with types; uniq string; + type = with types; uniq str; example = ''mail.example.com''; description = lib.mdDoc '' Primary MX domain to use. It should be FQDN.