Address review feedback.
This commit is contained in:
parent
af1a285017
commit
ee0444576f
@ -16,17 +16,11 @@ in
|
|||||||
|
|
||||||
services.eternal-terminal = {
|
services.eternal-terminal = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkEnableOption "Eternal Terminal server";
|
||||||
default = false;
|
|
||||||
type = types.bool;
|
|
||||||
description = ''
|
|
||||||
Enable the Eternal Terminal server.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
port = mkOption {
|
port = mkOption {
|
||||||
default = null;
|
default = 2022;
|
||||||
type = types.nullOr types.int;
|
type = types.int;
|
||||||
description = ''
|
description = ''
|
||||||
The port the server should listen on. Will use the server's default (2022) if not specified.
|
The port the server should listen on. Will use the server's default (2022) if not specified.
|
||||||
'';
|
'';
|
||||||
@ -34,17 +28,17 @@ in
|
|||||||
|
|
||||||
verbosity = mkOption {
|
verbosity = mkOption {
|
||||||
default = 0;
|
default = 0;
|
||||||
type = types.int;
|
type = types.enum (lib.range 0 9);
|
||||||
description = ''
|
description = ''
|
||||||
The verbosity level (0-9).
|
The verbosity level (0-9).
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
silence = mkOption {
|
silent = mkOption {
|
||||||
default = 0;
|
default = false;
|
||||||
type = types.int;
|
type = types.bool;
|
||||||
description = ''
|
description = ''
|
||||||
Silence.
|
If enabled, disables all logging.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -78,13 +72,12 @@ in
|
|||||||
; et.cfg : Config file for Eternal Terminal
|
; et.cfg : Config file for Eternal Terminal
|
||||||
;
|
;
|
||||||
|
|
||||||
${optionalString (cfg.port != null) ''
|
[Networking]
|
||||||
[Networking]
|
port = ${toString cfg.port}
|
||||||
port = ${toString cfg.port}
|
|
||||||
''}
|
|
||||||
[Debug]
|
[Debug]
|
||||||
verbose = ${toString cfg.verbosity}
|
verbose = ${toString cfg.verbosity}
|
||||||
silent = ${toString cfg.silence}
|
silent = ${if cfg.silent then "true" else "false"}
|
||||||
logsize = ${toString cfg.logSize}
|
logsize = ${toString cfg.logSize}
|
||||||
''}";
|
''}";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user