mirror of
https://git.sr.ht/~neverness/ultima
synced 2025-01-06 10:33:52 +00:00
26 lines
534 B
Nix
26 lines
534 B
Nix
{ pkgs, lib, config, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.module.programs.torrserver;
|
|
torr = pkgs.callPackage ./package.nix { };
|
|
in {
|
|
config = mkIf cfg.enable {
|
|
systemd.services = {
|
|
torrserver = {
|
|
enable = true;
|
|
after = [ "multi-user.target" "network.target" ];
|
|
wantedBy = [ "multi-user.target" ];
|
|
serviceConfig = {
|
|
ExecStart = "${torr}/bin/torrserver";
|
|
Restart = "on-failure";
|
|
Type = "simple";
|
|
TimeoutSec = 30;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|