Remove useless use of optionSet.

This commit is contained in:
Nicolas Pierron 2014-08-29 18:43:03 +02:00
parent 43e52ef001
commit 8c19690d99
2 changed files with 113 additions and 120 deletions

View File

@ -25,85 +25,6 @@ let
paths = cfg.modulePackages;
};
confOptions = { ... }: {
options = {
modules = mkOption {
type = types.listOf types.string;
default = [ "partyline" "webadmin" "adminlog" "log" ];
example = [ "partyline" "webadmin" "adminlog" "log" ];
description = ''
A list of modules to include in the `znc.conf` file.
'';
};
userModules = mkOption {
type = types.listOf types.string;
default = [ ];
example = [ "fish" "push" ];
description = ''
A list of user modules to include in the `znc.conf` file.
'';
};
userName = mkOption {
default = defaultUserName;
example = "johntron";
type = types.string;
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.
'';
};
nick = mkOption {
default = "znc-user";
example = "john";
type = types.string;
description = ''
The IRC nick to use when generating the `znc.conf` file.
'';
};
passBlock = mkOption {
default = defaultPassBlock;
example = "Must be the block generated by the `znc --makepass` command.";
type = types.string;
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.
This is the block generated by the `znc --makepass` command.
!!! If not specified, please change this after starting the service. !!!
'';
};
port = mkOption {
default = 5000;
example = 5000;
type = types.int;
description = ''
Specifies the port on which to listen.
'';
};
useSSL = mkOption {
default = true;
example = true;
type = types.bool;
description = ''
Indicates whether the ZNC server should use SSL when listening on the specified port.
'';
};
extraZncConf = mkOption {
default = "";
type = types.lines;
description = ''
Extra config to `znc.conf` file
'';
};
};
};
# Keep znc.conf in nix store, then symlink or copy into `dataDir`, depending on `mutable`.
mkZncConf = confOpts: ''
// Also check http://en.znc.in/wiki/Configuration
@ -211,18 +132,91 @@ in
'';
};
confOptions = mkOption {
default = {};
example = {
/* TODO: add to the documentation of the current module:
Values to use when creating a `znc.conf` file.
confOptions = {
modules = [ "log" ];
userName = "john";
nick = "johntron";
};
type = types.optionSet;
*/
confOptions = {
modules = mkOption {
type = types.listOf types.string;
default = [ "partyline" "webadmin" "adminlog" "log" ];
example = [ "partyline" "webadmin" "adminlog" "log" ];
description = ''
Values to use when creating a `znc.conf` file.
A list of modules to include in the `znc.conf` file.
'';
options = confOptions;
};
userModules = mkOption {
type = types.listOf types.string;
default = [ ];
example = [ "fish" "push" ];
description = ''
A list of user modules to include in the `znc.conf` file.
'';
};
userName = mkOption {
default = defaultUserName;
example = "johntron";
type = types.string;
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.
'';
};
nick = mkOption {
default = "znc-user";
example = "john";
type = types.string;
description = ''
The IRC nick to use when generating the `znc.conf` file.
'';
};
passBlock = mkOption {
default = defaultPassBlock;
example = "Must be the block generated by the `znc --makepass` command.";
type = types.string;
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.
This is the block generated by the `znc --makepass` command.
!!! If not specified, please change this after starting the service. !!!
'';
};
port = mkOption {
default = 5000;
example = 5000;
type = types.int;
description = ''
Specifies the port on which to listen.
'';
};
useSSL = mkOption {
default = true;
example = true;
type = types.bool;
description = ''
Indicates whether the ZNC server should use SSL when listening on the specified port.
'';
};
extraZncConf = mkOption {
default = "";
type = types.lines;
description = ''
Extra config to `znc.conf` file
'';
};
};
modulePackages = mkOption {

View File

@ -342,11 +342,11 @@ in
description = "Path where the ramfs used to update the LUKS key will be mounted in stage-1";
};
storage = mkOption {
type = types.optionSet;
description = "Options related to the storing the salt";
/* TODO: Add to the documentation of the current module:
options = {
Options related to the storing the salt.
*/
storage = {
device = mkOption {
default = "/dev/sda1";
type = types.path;
@ -379,7 +379,6 @@ in
};
};
};
};
};
};