services-flake icon indicating copy to clipboard operation
services-flake copied to clipboard

Question: How to use `systemd.service` ?

Open usmcamp0811 opened this issue 1 year ago • 3 comments

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.

usmcamp0811 avatar Jun 17 '24 01:06 usmcamp0811

One idea is to export homeModules with systemd and launchd configurations and these can be imported and activated using home-manager in your configuration.

shivaraj-bh avatar Jun 17 '24 06:06 shivaraj-bh

Relevant? https://github.com/NixOS/nixpkgs/pull/267111

cc @roberth

srid avatar Jul 03 '24 20:07 srid

Idea: work on this at NixCon with ideas from other people.

srid avatar Sep 23 '24 15:09 srid