From 65605dbf57035f51e4f7f34c0472d80bd88f39a2 Mon Sep 17 00:00:00 2001 From: Jan-Bulthuis Date: Thu, 17 Apr 2025 18:44:52 +0200 Subject: [PATCH] Moved spotifyd to user service --- modules/spotifyd/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/spotifyd/default.nix b/modules/spotifyd/default.nix index 34e170c..83e9719 100644 --- a/modules/spotifyd/default.nix +++ b/modules/spotifyd/default.nix @@ -22,19 +22,20 @@ in users.groups.mixer = { }; # Spotifyd service - systemd.services.spotifyd = { - description = "Spotifyd Service"; - wantedBy = [ "multi-user.target" ]; + systemd.user.services.spotifyd = { + description = "SpotifyD Service"; + wantedBy = [ "default.target" ]; after = [ "network.target" "sound.target" ]; + unitConfig = { + ConditionUser = "mixer"; # TODO: Allow user configuration + }; serviceConfig = { ExecStart = "${pkgs.spotifyd}/bin/spotifyd --no-daemon --config-path /etc/spotifyd/spotifyd.conf"; Restart = "always"; RestartSec = 5; - User = "mixer"; - Group = "mixer"; }; };