Extract mpd module

This commit is contained in:
Leonardo Eugênio 2023-01-18 01:13:47 -03:00
parent 6fe95f6358
commit f4e00ffb2c
2 changed files with 22 additions and 19 deletions

View file

@ -27,6 +27,7 @@ in {
./pass.nix ./pass.nix
./zathura.nix ./zathura.nix
./man.nix ./man.nix
./mpd.nix
inputs.hyprland.homeManagerModules.default inputs.hyprland.homeManagerModules.default
] ++ lib.optional (desktop == "sway") ./sway.nix; ] ++ lib.optional (desktop == "sway") ./sway.nix;
@ -181,25 +182,6 @@ in {
enable = true; enable = true;
indicator = true; indicator = true;
}; };
services.mpd = {
enable = true;
musicDirectory = config.home.homeDirectory + "/Música";
extraConfig = ''
restore_paused "yes"
auto_update "yes"
audio_output {
type "pulse"
name "My Pulse Output"
mixer_type "hardware"
}
filesystem_charset "UTF-8"
'';
};
services.mpdris2 = {
enable = true;
multimediaKeys = true;
notifications = true;
};
# This value determines the Home Manager release that your # This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage # configuration is compatible with. This helps avoid breakage

21
user/mpd.nix Normal file
View file

@ -0,0 +1,21 @@
{pkgs, config, ...}: {
services.mpd = {
enable = true;
musicDirectory = config.home.homeDirectory + "/Música";
extraConfig = ''
restore_paused "yes"
auto_update "yes"
audio_output {
type "pulse"
name "My Pulse Output"
mixer_type "hardware"
}
filesystem_charset "UTF-8"
'';
};
services.mpdris2 = {
enable = true;
multimediaKeys = true;
notifications = true;
};
}