Seems like this is a know issue, a workaround seems to be provided here to manually start the service without systemd. To better solve this issue, a Pull Request is waiting for review since one month here. Maybe you can try it out and help the reviewing process to go further?
To test it, the simplest is certainly to manually create the file cloudflare-warp.nix as describe here and add this file to your imports like:
I maintain cloudflare-warp. Yes, the problem is that the service, although contained on the package, will not work. The only way to use it on that case would be running the warp-svc on the background and then run the rest of commands through warp-cli. Thatβs why the module (the one linked by @tobiasBora) was created, to specifically move that service to /etc/systemd and make it available (which is why on NixOS it works differently compared to the other distros).
sudo nixos-rebuild switch instead appears erorr like this
error: builder for β/nix/store/h82pgsnl6a05s2bxw32bhy6vccgqdcp7-nss-cacert-3.86.drvβ failed with exit code 1
error: 1 dependencies of derivation β/nix/store/z2v318zraq18kg4j9qbx7wwyy3hp1fd5-etc.drvβ failed to build
error: 1 dependencies of derivation β/nix/store/ga0zw4rk5g026rbza93cc1xg0qlw3njp-nixos-system-nixos-22.11.1580.e285dd0ca97.drvβ failed to build
I have gotten this to work, but itβs not 100% reproducible. You have to download the CA Certificate and point it to the downloaded file in the config.