summaryrefslogtreecommitdiffstats
path: root/modules/music/mpd.nix
blob: 8ee1f1b2ed493ff523b95e4d5648cefce3754fa5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ config, lib, pkgs, user, ... }:
with lib;
let

in
{
    options = {
        mpd = {
            enable = mkOption {
                type = types.bool;
                default = false;
            };
        };
    };

    config.home-manager.users.${user} = mkIf (config.mpd.enable)
    {
        services.mpd = {
            enable = true;
            musicDirectory = "/home/${user}/mus";
            extraConfig = ''
audio_output {
    type "pipewire"
    name "Pipewire Output"
}
                          '';
        };
        
        home.packages = with pkgs; [
            mpc-cli
            ncmpcpp
        ];
    };
}