Moved spotifyd to user service

This commit is contained in:
Jan-Bulthuis 2025-04-17 18:44:52 +02:00
parent d3798b201a
commit 65605dbf57
1 changed files with 6 additions and 5 deletions

View File

@ -22,19 +22,20 @@ in
users.groups.mixer = { }; users.groups.mixer = { };
# Spotifyd service # Spotifyd service
systemd.services.spotifyd = { systemd.user.services.spotifyd = {
description = "Spotifyd Service"; description = "SpotifyD Service";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "default.target" ];
after = [ after = [
"network.target" "network.target"
"sound.target" "sound.target"
]; ];
unitConfig = {
ConditionUser = "mixer"; # TODO: Allow user configuration
};
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.spotifyd}/bin/spotifyd --no-daemon --config-path /etc/spotifyd/spotifyd.conf"; ExecStart = "${pkgs.spotifyd}/bin/spotifyd --no-daemon --config-path /etc/spotifyd/spotifyd.conf";
Restart = "always"; Restart = "always";
RestartSec = 5; RestartSec = 5;
User = "mixer";
Group = "mixer";
}; };
}; };