I have some understanding of systemd as it pertains to non-nixos systems. I’ve also read up (and created two of my own services in nixos). And I’ve spent some time browwing the nixpkgs code and nix modules code but I couldn’t figure out so I’m asking-
I want to create a user service which can have instances. (Ending in @
that is). The instances would be created based on reading a file in $XDG_CONFIG_HOME (one for each line). I want the instances to be autostarted when other user services start.
Is such a thing possible? On non-nixos, I’d have probably done systemd --user enable myservice@firstlineinconfigfile
and systemd --user enable myservice@secondlineinconfigfile
.