summaryrefslogtreecommitdiffstats
path: root/modules/music
diff options
context:
space:
mode:
Diffstat (limited to 'modules/music')
-rw-r--r--modules/music/default.nix3
-rw-r--r--modules/music/mpd.nix34
2 files changed, 37 insertions, 0 deletions
diff --git a/modules/music/default.nix b/modules/music/default.nix
new file mode 100644
index 0000000..cce3744
--- /dev/null
+++ b/modules/music/default.nix
@@ -0,0 +1,3 @@
+[
+ ./mpd.nix
+]
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
+ ];
+ };
+}