nebula: improve integration
[sourcephile-nix.git] / nixos / modules / services / networking / upnpc.nix
index 6c090257a8b53d5179d580cc95c3c243da49efb3..9e777e5952e13f35323ea5dab7e8ebd8e353d72e 100644 (file)
@@ -110,9 +110,10 @@ in
               '';
               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