From 7b599b6e10ab6e5fd3e7ec0c5b7d79a586375842 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Sat, 30 Sep 2023 11:25:55 -0400 Subject: add music module --- modules/music/mpd.nix | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 modules/music/mpd.nix (limited to 'modules/music/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 + ]; + }; +} -- cgit v1.2.1