I believe the User option in systemd unit configuration should do this. See
the systemd.service man page - all options can be used in NixOS
On 4 Jun 2015 10:05 pm, "Ganesh Sittampalam" <[email protected]> wrote:

> Hi,
>
> I'm adding a service - darcsden - to NixOS that is designed to run as a
> non-root user, but should optionally be able to bind to a privileged
> port. It's not designed to start as root and then fork/drop privileges,
> so I'd like to handle this at the OS level somehow.
>
> I'm aware of various solutions:
>
>
> http://unix.stackexchange.com/questions/10735/linux-allowing-an-user-to-listen-to-a-port-below-1024
>
>
> http://stackoverflow.com/questions/413807/is-there-a-way-for-non-root-processes-to-bind-to-privileged-ports-1024-on-l
>
> Is there any standard/preferred way to do this in NixOS?
>
> Cheers,
>
> Ganesh
> _______________________________________________
> nix-dev mailing list
> [email protected]
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to