Compare commits

..

2 Commits

Author SHA1 Message Date
Jan-Bulthuis af3984498c Made mixer user linger 2025-04-17 18:46:20 +02:00
Jan-Bulthuis 65605dbf57 Moved spotifyd to user service 2025-04-17 18:44:52 +02:00
2 changed files with 7 additions and 5 deletions

View File

@ -47,6 +47,7 @@
users.users.mixer = { users.users.mixer = {
isNormalUser = true; isNormalUser = true;
group = "mixer"; group = "mixer";
linger = true;
extraGroups = [ "systemd-journal" ]; extraGroups = [ "systemd-journal" ];
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKKxoQSxfYqf9ITN8Fhckk8WbY4dwtBAXOhC9jxihJvq jan@bulthuis.dev" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKKxoQSxfYqf9ITN8Fhckk8WbY4dwtBAXOhC9jxihJvq jan@bulthuis.dev"

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";
}; };
}; };