mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
Remove useless use of optionSet.
This commit is contained in:
parent
43e52ef001
commit
8c19690d99
@ -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 = {
|
||||
modules = [ "log" ];
|
||||
userName = "john";
|
||||
nick = "johntron";
|
||||
/* 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";
|
||||
};
|
||||
*/
|
||||
confOptions = {
|
||||
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
|
||||
'';
|
||||
};
|
||||
type = types.optionSet;
|
||||
description = ''
|
||||
Values to use when creating a `znc.conf` file.
|
||||
'';
|
||||
options = confOptions;
|
||||
};
|
||||
|
||||
modulePackages = mkOption {
|
||||
|
@ -342,40 +342,39 @@ 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 = {
|
||||
device = mkOption {
|
||||
default = "/dev/sda1";
|
||||
type = types.path;
|
||||
description = ''
|
||||
An unencrypted device that will temporarily be mounted in stage-1.
|
||||
Must contain the current salt to create the challenge for this LUKS device.
|
||||
'';
|
||||
};
|
||||
Options related to the storing the salt.
|
||||
*/
|
||||
storage = {
|
||||
device = mkOption {
|
||||
default = "/dev/sda1";
|
||||
type = types.path;
|
||||
description = ''
|
||||
An unencrypted device that will temporarily be mounted in stage-1.
|
||||
Must contain the current salt to create the challenge for this LUKS device.
|
||||
'';
|
||||
};
|
||||
|
||||
fsType = mkOption {
|
||||
default = "vfat";
|
||||
type = types.string;
|
||||
description = "The filesystem of the unencrypted device";
|
||||
};
|
||||
fsType = mkOption {
|
||||
default = "vfat";
|
||||
type = types.string;
|
||||
description = "The filesystem of the unencrypted device";
|
||||
};
|
||||
|
||||
mountPoint = mkOption {
|
||||
default = "/crypt-storage";
|
||||
type = types.string;
|
||||
description = "Path where the unencrypted device will be mounted in stage-1";
|
||||
};
|
||||
mountPoint = mkOption {
|
||||
default = "/crypt-storage";
|
||||
type = types.string;
|
||||
description = "Path where the unencrypted device will be mounted in stage-1";
|
||||
};
|
||||
|
||||
path = mkOption {
|
||||
default = "/crypt-storage/default";
|
||||
type = types.string;
|
||||
description = ''
|
||||
Absolute path of the salt on the unencrypted device with
|
||||
that device's root directory as "/".
|
||||
'';
|
||||
};
|
||||
path = mkOption {
|
||||
default = "/crypt-storage/default";
|
||||
type = types.string;
|
||||
description = ''
|
||||
Absolute path of the salt on the unencrypted device with
|
||||
that device's root directory as "/".
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user