1 { config, lib, pkgs, ... }:
5 cfg = config.services.opentracker;
7 options.services.opentracker = {
8 enable = mkEnableOption (lib.mdDoc "opentracker");
12 description = lib.mdDoc ''
13 opentracker package to use
15 default = pkgs.opentracker;
16 defaultText = literalExpression "pkgs.opentracker";
19 extraOptions = mkOption {
20 type = types.separatedString " ";
21 description = lib.mdDoc ''
22 Configuration Arguments for opentracker
23 See https://erdgeist.org/arts/software/opentracker/ for all params
29 config = lib.mkIf cfg.enable {
31 systemd.services.opentracker = {
32 description = "opentracker server";
33 after = [ "network.target" ];
34 wantedBy = [ "multi-user.target" ];
35 restartIfChanged = true;
37 ExecStart = "${cfg.package}/bin/opentracker ${cfg.extraOptions}";
39 WorkingDirectory = "/var/empty";
40 # By default opentracker drops all privileges and runs in chroot after starting up as root.