{ pkgs, lib, config, ... }:
with lib;
let
- inherit (config.users) users;
+ inherit (config.users) users groups;
cfg = config.services.upnpc;
getInfo = ''
while IFS=: read -r k v; do
(*ConflictInMappingEntry*) result=conflict ;;
esac
done <<EOF
- $(upnpc -u "$desc" -e "${r.description}" -a "$localIP" ${toString r.internalPort} ${toString r.externalPort} ${r.protocol} ${toString r.duration} 2>&1)
+ $(upnpc -u "$desc" ${optionalString (r.description != "") "-e \"${r.description}\""} \
+ -a "$localIP" ${toString r.internalPort} ${toString r.externalPort} ${r.protocol} ${toString r.duration} 2>&1)
EOF
}
while true; do
) cfg.redirections);
# This enables to match on the uid in the firewall.
- users.users."upnpc".isSystemUser = true;
+ users.users."upnpc" = {
+ isSystemUser = true;
+ group = groups."upnpc".name;
+ };
+ users.groups."upnpc" = {};
};
meta.maintainers = with maintainers; [ julm ];
}