Manage systemd services without full nixos?

For a particular thing, I cannot yet use full nixos (I’d like to get there, but need to migrate incrementally). But I would like to use nix to install some packages, as well as manage some of the systemd services using those packages. And for those things, I’d like to have generations and the ability to rollback changes.

home-manager kind of does this, but it seems more scoped for a single user. I’d be running some of these nix-managed services as per-service users. Perhaps running home-manager as root is the “right” way to do this? I’m not sure.

nix-darwin does pretty much what I want more-or-less, but for mac. It can manage launchd services, install global packages, and has rollback.

I guess I’m asking is there something like nix-darwin for linux, that isn’t full nixos? Which I know seems like an odd question.

For context, I’ve been using nix for a little over a year and half. I’m comfortable writing somewhat complex derivations. I’ve played around with some nixos vms, but mainly use nix-darwin+home-manager on a mac. So they’ve been managing my profiles and I haven’t done much with profiles directly. It also feels like maybe profiles could also the answer but I’m not sure.


Thanks, looks exactly like what I was picturing!