mirror of
https://github.com/tuxdotrs/nixos-config.git
synced 2025-07-06 17:56:35 +05:30
feat: update trok inputs and options
This commit is contained in:
4
flake.lock
generated
4
flake.lock
generated
@ -1099,8 +1099,8 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1740655111,
|
"lastModified": 1740677262,
|
||||||
"narHash": "sha256-kDIolURbhhIYPteFKgND+4MPmLbtkJBh6T/gpavYA28=",
|
"narHash": "sha256-WkKJUUyh88jYya2PUqd3VBc00cU7i8aCfPDRSEW22fs=",
|
||||||
"path": "/home/tux/Projects/trok",
|
"path": "/home/tux/Projects/trok",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
|
@ -10,6 +10,12 @@ in {
|
|||||||
options.tux.services.trok = {
|
options.tux.services.trok = {
|
||||||
enable = mkEnableOption "Enable 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 {
|
port = mkOption {
|
||||||
type = lib.types.port;
|
type = lib.types.port;
|
||||||
default = 1337;
|
default = 1337;
|
||||||
@ -44,7 +50,7 @@ in {
|
|||||||
Type = "simple";
|
Type = "simple";
|
||||||
User = "trok";
|
User = "trok";
|
||||||
Group = "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";
|
Restart = "always";
|
||||||
|
|
||||||
LockPersonality = true;
|
LockPersonality = true;
|
||||||
|
Reference in New Issue
Block a user