This commit is contained in:
Madeleine Sydney
2025-03-23 23:16:03 -06:00
parent c3c1359b4f
commit ef9943b707
22 changed files with 300 additions and 106 deletions

View File

@@ -14,11 +14,7 @@ in {
};
scrobbling = {
enable = mkOption {
description = "Enable scrobbling for MPD via mpdscribble.";
type = types.bool;
default = cfg.enable;
};
enable = mkEnableOption "Enable scrobbling for MPD via mpdscribble.";
endpoints = mkOption {
type = types.attrsOf (types.submodule ({ ... }: {
@@ -35,16 +31,22 @@ in {
};
discord = {
enable = mkOption {
description = "Enable Discord integration for MPD via mpd-discord-rpc.";
type = types.bool;
default = cfg.enable;
};
enable =
mkEnableOption "Discord integration for MPD via mpd-discord-rpc";
};
};
};
config = mkIf cfg.enable {
sydnix.impermanence.directories =
let xdg-state-dir =
config.home.statehome
or "${config.home.homeDirectory}/.local/state";
in [
(lib.removePrefix
config.home.homeDirectory
"${xdg-state-dir}/mpd")
];
services.mpd = {
enable = true;
musicDirectory = cfg.musicDirectory;