I am on Debain 11. I use home-manager to install and manage apps.
But the app I installed needs a systemd service to be started.
Trying to start using sudo systemctl start service or systemctl --user start service doesn’t work. Obviously because it’s in a different location. So how can I start it?
That could lead to unexpected breakage after the next update and gc.
I’ve never used a setup like this but you could create an environment via nix-env that has the service and its etc dir in it and then symlink the unit file from there. This way you can update this managed nix-env as expected.
Home Manager has an option to automatically set some environment variables that will ease usage of software installed with nix on non-NixOS linux (fixing local issues, settings XDG_DATA_DIRS, etc.):
Unfortunately there isn’t one for cloudflare-warp and I am not knowledgeable enough to create on myself (let me know if you do). So I use the app by other means.*
But if there is one it will work like this:
cloudflare-warp needs to be installed as a service like so in your home.nix:
services.cloudflare-warp.enable = true;
and after you switch your configuration:
home-manager switch
you will see a prompt letting you know how to start the systemd service.
*A quick solution for now would be:
$ sudo which(warp-svc)
# on another terminal
$ warp-cli register #for first time
$ warp-cli connect