diff options
author | Herwig Hochleitner <herwig@bendlas.net> | 2023-10-09 00:28:33 +0200 |
---|---|---|
committer | Herwig Hochleitner <herwig@bendlas.net> | 2023-10-10 00:23:27 +0200 |
commit | 13364f124a83832edc4abb259f03e5d264f70a68 (patch) | |
tree | 98e6419e26cf5fd292ae1193b2683462b3cc37d5 /nixos/modules/programs | |
parent | ba10489eae3b2b2f665947b516e7043594a235c8 (diff) | |
download | nixpkgs-13364f124a83832edc4abb259f03e5d264f70a68.tar nixpkgs-13364f124a83832edc4abb259f03e5d264f70a68.tar.gz nixpkgs-13364f124a83832edc4abb259f03e5d264f70a68.tar.bz2 nixpkgs-13364f124a83832edc4abb259f03e5d264f70a68.tar.lz nixpkgs-13364f124a83832edc4abb259f03e5d264f70a68.tar.xz nixpkgs-13364f124a83832edc4abb259f03e5d264f70a68.tar.zst nixpkgs-13364f124a83832edc4abb259f03e5d264f70a68.zip |
cdemu: fix service setup
closes https://github.com/NixOS/nixpkgs/issues/154613
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r-- | nixos/modules/programs/cdemu.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nixos/modules/programs/cdemu.nix b/nixos/modules/programs/cdemu.nix index d43f009f2f9..7eba4d29d83 100644 --- a/nixos/modules/programs/cdemu.nix +++ b/nixos/modules/programs/cdemu.nix @@ -53,6 +53,19 @@ in { dbus.packages = [ pkgs.cdemu-daemon ]; }; + users.groups.${config.programs.cdemu.group} = {}; + + # Systemd User service + # manually adapted from example in source package: + # https://sourceforge.net/p/cdemu/code/ci/master/tree/cdemu-daemon/service-example/cdemu-daemon.service + systemd.user.services.cdemu-daemon.description = "CDEmu daemon"; + systemd.user.services.cdemu-daemon.serviceConfig = { + Type = "dbus"; + BusName = "net.sf.cdemu.CDEmuDaemon"; + ExecStart = "${pkgs.cdemu-daemon}/bin/cdemu-daemon --config-file \"%h/.config/cdemu-daemon\""; + Restart = "no"; + }; + environment.systemPackages = [ pkgs.cdemu-daemon pkgs.cdemu-client ] ++ optional cfg.gui pkgs.gcdemu |