diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index ffb24ed..5cd2e34 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -24,7 +24,7 @@ master = true; bde = true; ada = true; - music = true; + music = false; tempvoc = true; ticket = true; }; diff --git a/services/bot_discord/music.nix b/services/bot_discord/music.nix index 90cb294..1bb30b4 100644 --- a/services/bot_discord/music.nix +++ b/services/bot_discord/music.nix @@ -8,13 +8,24 @@ in environment.systemPackages = with pkgs; [ nodejs ]; + users = { + groups.dsc_music = { + name = "dsc_music"; + }; + users.dsc_music = { + description = "Utilisateur pour le bot music"; + group = "dsc_music"; + home = "/opt/music"; + isSystemUser = true; + }; + }; systemd.services.music = { description = "Enium discord bot for music"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { Type = "simple"; - User = "nobody"; + User = "dsc_music"; WorkingDirectory = "/opt/music"; ExecStart = "${pkgs.nodejs}/bin/npm start"; Environment = "PATH=${pkgs.coreutils}/bin:${pkgs.bash}/bin:${pkgs.nodejs}/bin";