Skip to content

Startup fails on Nixos

The setcap call when setting up caddy fails on Nixos with this error:

hello from devenv git version 2.47.0

Setting up Caddy, you may be asked for your sudo password

[sudo] password for john: direnv: ([/nix/store/5acgdhnifp5hsvhw2w34jhs5xqjgv0v3-direnv-2.35.0/bin/direnv export fish]) is taking a while to execute. Use CTRL-C to give up.

Sorry, try again. [sudo] password for john: Failed to set capabilities on file 'setcap': Read-only file system

... this line is failing. I'm seeing a service.wrapper command to add the capability for caddy, but that's not recognized in devenv.nix -- can that be added somewhere in your setup?

Running sudo sysctl -w net.ipv4.ip_unprivileged_port_start=0 in the shell before running devenv up does work.