summaryrefslogtreecommitdiffstats
path: root/modules/music/mpd.nix
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2023-09-30 11:25:55 -0400
committerJon Santmyer <jon@jonsantmyer.com>2023-09-30 11:25:55 -0400
commit7b599b6e10ab6e5fd3e7ec0c5b7d79a586375842 (patch)
tree212d9af3fd793814472aa3b93a6f4bbdfc3ec2d4 /modules/music/mpd.nix
parent0d1276915ca8cdd9b1b65f8c11832d0d598c49af (diff)
downloadnix-config-7b599b6e10ab6e5fd3e7ec0c5b7d79a586375842.tar.gz
nix-config-7b599b6e10ab6e5fd3e7ec0c5b7d79a586375842.tar.bz2
nix-config-7b599b6e10ab6e5fd3e7ec0c5b7d79a586375842.zip
add music module
Diffstat (limited to 'modules/music/mpd.nix')
-rw-r--r--modules/music/mpd.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/modules/music/mpd.nix b/modules/music/mpd.nix
new file mode 100644
index 0000000..8ee1f1b
--- /dev/null
+++ b/modules/music/mpd.nix
@@ -0,0 +1,34 @@
+{ config, lib, pkgs, user, ... }:
+with lib;
+let
+
+in
+{
+ options = {
+ mpd = {
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ };
+ };
+ };
+
+ config.home-manager.users.${user} = mkIf (config.mpd.enable)
+ {
+ services.mpd = {
+ enable = true;
+ musicDirectory = "/home/${user}/mus";
+ extraConfig = ''
+audio_output {
+ type "pipewire"
+ name "Pipewire Output"
+}
+ '';
+ };
+
+ home.packages = with pkgs; [
+ mpc-cli
+ ncmpcpp
+ ];
+ };
+}