{ nix-config, pkgs, ... }:

{
  home.packages = with pkgs; [
    mpc
    ncmpcpp
    termusic
    nix-config.packages.x86_64-linux.rmpc-latest
  ];

  programs.fish.shellAliases = { "ncm" = "ncmpcpp"; };

  services = {
    mpd = {
      enable = true;
      musicDirectory = "/mnt/filez/media/Music";
      extraConfig = ''
      audio_output {
        type "pipewire"
        name "Default Playback"
      }
      '';
      network.startWhenNeeded = true;
    };
    mpdris2 = {
      enable = true;
    };
    playerctld = {
      enable = true;
      package = pkgs.playerctl;
    };
  };

  xdg.configFile."rmpc/" = {
    source = ./rmpc;
    recursive = true;
  };

  xdg.configFile."ncmpcpp/" = {
    source = ./ncmpcpp;
    recursive = true;
  };

}
