9 cfg = config.services.eternal-terminal;
19 services.eternal-terminal = {
21 enable = lib.mkEnableOption "Eternal Terminal server";
25 type = lib.types.port;
27 The port the server should listen on. Will use the server's default (2022) if not specified.
29 Make sure to open this port in the firewall if necessary.
33 verbosity = lib.mkOption {
35 type = lib.types.enum (lib.range 0 9);
37 The verbosity level (0-9).
41 silent = lib.mkOption {
43 type = lib.types.bool;
45 If enabled, disables all logging.
49 logSize = lib.mkOption {
61 config = lib.mkIf cfg.enable {
63 # We need to ensure the et package is fully installed because
64 # the (remote) et client runs the `etterminal` binary when it
66 environment.systemPackages = [ pkgs.eternal-terminal ];
70 description = "Eternal Terminal server.";
71 wantedBy = [ "multi-user.target" ];
72 after = [ "network.target" ];
75 ExecStart = "${pkgs.eternal-terminal}/bin/etserver --daemon --cfgfile=${pkgs.writeText "et.cfg" ''
76 ; et.cfg : Config file for Eternal Terminal
80 port = ${toString cfg.port}
83 verbose = ${toString cfg.verbosity}
84 silent = ${if cfg.silent then "1" else "0"}
85 logsize = ${toString cfg.logSize}
87 Restart = "on-failure";