28 lines
494 B
Nix
28 lines
494 B
Nix
|
{ 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
|
||
|
];
|
||
|
|
||
|
};
|
||
|
|
||
|
}
|