diff --git a/flake.lock b/flake.lock index b1d5447..1138890 100755 --- a/flake.lock +++ b/flake.lock @@ -1099,8 +1099,8 @@ ] }, "locked": { - "lastModified": 1740655111, - "narHash": "sha256-kDIolURbhhIYPteFKgND+4MPmLbtkJBh6T/gpavYA28=", + "lastModified": 1740677262, + "narHash": "sha256-WkKJUUyh88jYya2PUqd3VBc00cU7i8aCfPDRSEW22fs=", "path": "/home/tux/Projects/trok", "type": "path" }, diff --git a/modules/nixos/selfhosted/trok.nix b/modules/nixos/selfhosted/trok.nix index a2e0231..81a8c9f 100644 --- a/modules/nixos/selfhosted/trok.nix +++ b/modules/nixos/selfhosted/trok.nix @@ -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;