generated from ElnuDev/rust-project
Add port configuration for tatoeba to flake.nix
This commit is contained in:
parent
eea354e322
commit
62a0bc8fcd
1 changed files with 8 additions and 1 deletions
|
@ -68,6 +68,13 @@
|
||||||
The tatoeba package that should be used.
|
The tatoeba package that should be used.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
port = lib.mkOption {
|
||||||
|
type = lib.types.port;
|
||||||
|
default = 3001;
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
The port at which to run.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
config = {
|
config = {
|
||||||
systemd.services.tatoeba = let
|
systemd.services.tatoeba = let
|
||||||
|
@ -79,7 +86,7 @@
|
||||||
wantedBy = [ "network.target" ];
|
wantedBy = [ "network.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
${cfg.package}/bin/tatoeba
|
${cfg.package}/bin/tatoeba --port ${cfg.port}
|
||||||
'';
|
'';
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue