Remove useless use of optionSet.
This commit is contained in:
parent
43e52ef001
commit
8c19690d99
@ -25,85 +25,6 @@ let
|
|||||||
paths = cfg.modulePackages;
|
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`.
|
# Keep znc.conf in nix store, then symlink or copy into `dataDir`, depending on `mutable`.
|
||||||
mkZncConf = confOpts: ''
|
mkZncConf = confOpts: ''
|
||||||
// Also check http://en.znc.in/wiki/Configuration
|
// Also check http://en.znc.in/wiki/Configuration
|
||||||
@ -211,18 +132,91 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
confOptions = mkOption {
|
/* TODO: add to the documentation of the current module:
|
||||||
default = {};
|
|
||||||
example = {
|
Values to use when creating a `znc.conf` file.
|
||||||
modules = [ "log" ];
|
|
||||||
userName = "john";
|
confOptions = {
|
||||||
nick = "johntron";
|
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 {
|
modulePackages = mkOption {
|
||||||
|
@ -342,40 +342,39 @@ in
|
|||||||
description = "Path where the ramfs used to update the LUKS key will be mounted in stage-1";
|
description = "Path where the ramfs used to update the LUKS key will be mounted in stage-1";
|
||||||
};
|
};
|
||||||
|
|
||||||
storage = mkOption {
|
/* TODO: Add to the documentation of the current module:
|
||||||
type = types.optionSet;
|
|
||||||
description = "Options related to the storing the salt";
|
|
||||||
|
|
||||||
options = {
|
Options related to the storing the salt.
|
||||||
device = mkOption {
|
*/
|
||||||
default = "/dev/sda1";
|
storage = {
|
||||||
type = types.path;
|
device = mkOption {
|
||||||
description = ''
|
default = "/dev/sda1";
|
||||||
An unencrypted device that will temporarily be mounted in stage-1.
|
type = types.path;
|
||||||
Must contain the current salt to create the challenge for this LUKS device.
|
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 {
|
fsType = mkOption {
|
||||||
default = "vfat";
|
default = "vfat";
|
||||||
type = types.string;
|
type = types.string;
|
||||||
description = "The filesystem of the unencrypted device";
|
description = "The filesystem of the unencrypted device";
|
||||||
};
|
};
|
||||||
|
|
||||||
mountPoint = mkOption {
|
mountPoint = mkOption {
|
||||||
default = "/crypt-storage";
|
default = "/crypt-storage";
|
||||||
type = types.string;
|
type = types.string;
|
||||||
description = "Path where the unencrypted device will be mounted in stage-1";
|
description = "Path where the unencrypted device will be mounted in stage-1";
|
||||||
};
|
};
|
||||||
|
|
||||||
path = mkOption {
|
path = mkOption {
|
||||||
default = "/crypt-storage/default";
|
default = "/crypt-storage/default";
|
||||||
type = types.string;
|
type = types.string;
|
||||||
description = ''
|
description = ''
|
||||||
Absolute path of the salt on the unencrypted device with
|
Absolute path of the salt on the unencrypted device with
|
||||||
that device's root directory as "/".
|
that device's root directory as "/".
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user