Question: How to use `systemd.service` ?
Has anyone thought of a good way to share the same code that creates a systemd.service in a NixOS system configuration with a service in a flake? I want to have a NixOS system configuration with many services running across all the systems I manage. Additionally, I want to create a process-compose package in my system flake that can set up a development environment with the exact same services.
One idea I had was to rework my services into writeShellApplication scripts that get executed by the systemd.service. However, this seems laborious and there might be a better way to achieve this.
One idea is to export homeModules with systemd and launchd configurations and these can be imported and activated using home-manager in your configuration.
Relevant? https://github.com/NixOS/nixpkgs/pull/267111
cc @roberth
Idea: work on this at NixCon with ideas from other people.