22 lines
617 B
Nix
22 lines
617 B
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
systemd.user.services.byedpi-proxy = {
|
|
Unit.Description = "Byedpi proxy service";
|
|
Install.WantedBy = [ "default.target" ];
|
|
Service = {
|
|
Restart = "always";
|
|
ExecStart = "${pkgs.writeShellScript "byedpi-service-start" ''
|
|
#!/run/current-system/sw/bin/bash
|
|
${pkgs.byedpi}/bin/ciadpi \
|
|
--ip 127.0.0.1 --port 10080 \
|
|
-o1 -a1 -An -n otus.ru -d1:3 -f-1 -a2
|
|
''}";
|
|
ExecStop = "${pkgs.writeShellScript "byedpi-service-stop" ''
|
|
#!/run/current-system/sw/bin/bash
|
|
${pkgs.toybox}/bin/killall ciadpi
|
|
''}";
|
|
};
|
|
};
|
|
}
|