'';
ExecStop = "${pkgs.miniupnpc}/bin/upnpc -d ${toString r.externalPort} ${r.protocol}";
Restart = "on-failure";
- RestartSec = mkDefault r.maintainPeriod;
DynamicUser = true;
User = users."upnpc".name;
+ } // lib.optionalAttrs (r.maintainPeriod != null) {
+ RestartSec = mkDefault r.maintainPeriod;
};
}
r.service
)
cfg.redirections);
+ environment.systemPackages = [ pkgs.miniupnpc ];
+
# This enables to match on the uid in the firewall.
users.users."upnpc" = {
isSystemUser = true;