1 { config, lib, pkgs, ... }:
7 cfg = config.services.eternal-terminal;
17 services.eternal-terminal = {
19 enable = mkEnableOption (lib.mdDoc "Eternal Terminal server");
24 description = lib.mdDoc ''
25 The port the server should listen on. Will use the server's default (2022) if not specified.
27 Make sure to open this port in the firewall if necessary.
31 verbosity = mkOption {
33 type = types.enum (lib.range 0 9);
34 description = lib.mdDoc ''
35 The verbosity level (0-9).
42 description = lib.mdDoc ''
43 If enabled, disables all logging.
50 description = lib.mdDoc ''
59 config = mkIf cfg.enable {
61 # We need to ensure the et package is fully installed because
62 # the (remote) et client runs the `etterminal` binary when it
64 environment.systemPackages = [ pkgs.eternal-terminal ];
68 description = "Eternal Terminal server.";
69 wantedBy = [ "multi-user.target" ];
70 after = [ "network.target" ];
73 ExecStart = "${pkgs.eternal-terminal}/bin/etserver --daemon --cfgfile=${pkgs.writeText "et.cfg" ''
74 ; et.cfg : Config file for Eternal Terminal
78 port = ${toString cfg.port}
81 verbose = ${toString cfg.verbosity}
82 silent = ${if cfg.silent then "1" else "0"}
83 logsize = ${toString cfg.logSize}
85 Restart = "on-failure";
93 maintainers = with lib.maintainers; [ ];