prepare for multiple home-manager configs

This commit is contained in:
2025-01-16 10:43:56 -06:00
parent ee5e3ae9b0
commit 945e3765e8
65 changed files with 59 additions and 36 deletions

View File

@@ -0,0 +1,41 @@
{ config, lib, pkgs, ... }: {
options = {
homeconfig.mpd.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
};
config = lib.mkIf config.homeconfig.mpd.enable {
services.mpd = {
enable = true;
network.startWhenNeeded = true;
network.port = 6600;
network.listenAddress = "127.0.0.1";
musicDirectory = "/home/nathan/Music";
extraConfig = ''
audio_output {
type "pipewire"
name "Audio1"
}
audio_output {
type "fifo"
name "visualizer"
path "/tmp/mpd.fifo"
format "44100:16:1"
}
'';
};
services.mpdris2 = {
enable = true;
mpd.host = "127.0.0.1";
mpd.port = 6600;
package = pkgs.mpdris2;
mpd.musicDirectory = "/home/nathan/Music";
notifications = true;
};
};
}