config/modules/mpd.nix

28 lines
494 B
Nix
Raw Normal View History

2022-06-18 10:00:51 +02:00
{ config, pkgs, lib, ... }:
let cfg = config.riley.mpd; in
with lib; {
options.riley.mpd = {
enable = mkEnableOption "music player daemon";
};
config = mkIf (cfg.enable) {
# Enable the service
home-manager.users."riley" = {
services.mpd = {
enable = true;
musicDirectory = "$HOME/media/music";
};
};
users.users."riley".packages = with pkgs; [
mpc_cli
];
};
}