diff options
author | Bjørn Forsman <bjorn.forsman@gmail.com> | 2014-07-13 20:27:19 +0200 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2014-07-13 20:33:15 +0200 |
commit | 3a4498ab074e2469a03cca8064250a754a43dfc1 (patch) | |
tree | cd50baaf50eb6517ae8d37047aa42bc46bec8bed | |
parent | a9858101bc535e3bd08c17e5d052c7083217d5ca (diff) | |
download | nixlib-3a4498ab074e2469a03cca8064250a754a43dfc1.tar nixlib-3a4498ab074e2469a03cca8064250a754a43dfc1.tar.gz nixlib-3a4498ab074e2469a03cca8064250a754a43dfc1.tar.bz2 nixlib-3a4498ab074e2469a03cca8064250a754a43dfc1.tar.lz nixlib-3a4498ab074e2469a03cca8064250a754a43dfc1.tar.xz nixlib-3a4498ab074e2469a03cca8064250a754a43dfc1.tar.zst nixlib-3a4498ab074e2469a03cca8064250a754a43dfc1.zip |
nixos/znc-service: don't use types.string (it's deprecated)
Apart from s/types.string/types.str/ (or types.lines where appropriate): * port is changed from string to int. * extraFlags is changed from types.string (with unfortunate merge semantics) into a list of strings. A list of strings merge better: one space is added between elements.
-rw-r--r-- | nixos/modules/services/networking/znc.nix | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/nixos/modules/services/networking/znc.nix b/nixos/modules/services/networking/znc.nix index a40fd924741b..56946f37aaf9 100644 --- a/nixos/modules/services/networking/znc.nix +++ b/nixos/modules/services/networking/znc.nix @@ -23,7 +23,7 @@ let confOptions = { ... }: { options = { modules = mkOption { - type = types.listOf types.string; + type = types.listOf types.str; default = [ "partyline" "webadmin" "adminlog" "log" ]; example = [ "partyline" "webadmin" "adminlog" "log" ]; description = '' @@ -34,7 +34,7 @@ let userName = mkOption { default = defaultUserName; example = "johntron"; - type = types.string; + type = types.str; description = '' The user name to use when generating the `znc.conf` file. This is the user name used by the user logging into the ZNC web admin. @@ -44,7 +44,7 @@ let nick = mkOption { default = "znc-user"; example = "john"; - type = types.string; + type = types.str; description = '' The IRC nick to use when generating the `znc.conf` file. ''; @@ -53,7 +53,7 @@ let passBlock = mkOption { default = defaultPassBlock; example = "Must be the block generated by the `znc --makepass` command."; - type = types.string; + type = types.str; description = '' The pass block to use when generating the `znc.conf` file. This is the password used by the user logging into the ZNC web admin. @@ -63,9 +63,9 @@ let }; port = mkOption { - default = "5000"; - example = "5000"; - type = types.string; + default = 5000; + example = 5000; + type = types.int; description = '' Specifies the port on which to listen. ''; @@ -104,7 +104,7 @@ let AllowWeb = true IPv4 = true IPv6 = false - Port = ${if confOpts.useSSL then "+" else ""}${confOpts.port} + Port = ${if confOpts.useSSL then "+" else ""}${toString confOpts.port} SSL = ${if confOpts.useSSL then "true" else "false"} </Listener> @@ -160,7 +160,7 @@ in user = mkOption { default = "znc"; example = "john"; - type = types.string; + type = types.str; description = '' The name of an existing user account to use to own the ZNC server process. If not specified, a default user will be created to own the process. @@ -170,7 +170,7 @@ in dataDir = mkOption { default = "/home/${cfg.user}/.znc"; example = "/home/john/.znc"; - type = types.string; + type = types.path; description = '' The data directory. Used for configuration files and modules. ''; @@ -179,7 +179,7 @@ in zncConf = mkOption { default = ""; example = "See: http://wiki.znc.in/Configuration"; - type = types.string; + type = types.lines; description = '' The contents of the `znc.conf` file to use when creating it. If specified, `confOptions` will be ignored, and this value, as-is, will be used. @@ -218,9 +218,9 @@ in }; extraFlags = mkOption { - default = ""; - example = "--debug"; - type = types.string; + default = [ ]; + example = [ "--debug" ]; + type = types.listOf types.str; description = '' Extra flags to use when executing znc command. ''; @@ -272,7 +272,7 @@ in ${pkgs.znc}/bin/znc --makepem fi ''; - script = "${pkgs.znc}/bin/znc --foreground --datadir ${cfg.dataDir} ${cfg.extraFlags}"; + script = "${pkgs.znc}/bin/znc --foreground --datadir ${cfg.dataDir} ${toString cfg.extraFlags}"; }; users.extraUsers = optional (cfg.user == defaultUser) |