feat: update trok inputs and options

This commit is contained in:
tux
2025-02-27 22:58:37 +05:30
parent 6d0585bbc0
commit 307acb5bfa
2 changed files with 9 additions and 3 deletions

View File

@ -10,6 +10,12 @@ in {
options.tux.services.trok = {
enable = mkEnableOption "Enable trok";
host = mkOption {
type = lib.types.str;
default = "0.0.0.0";
description = "Host addr on which the trok service will listen.";
};
port = mkOption {
type = lib.types.port;
default = 1337;
@ -44,7 +50,7 @@ in {
Type = "simple";
User = "trok";
Group = "trok";
ExecStart = "${getExe pkgs.trok} server -p ${toString cfg.port}";
ExecStart = "${getExe pkgs.trok} server -a ${cfg.host}:${toString cfg.port}";
Restart = "always";
LockPersonality = true;