diff options
author | Jon Santmyer <jon@jonsantmyer.com> | 2023-09-30 11:25:55 -0400 |
---|---|---|
committer | Jon Santmyer <jon@jonsantmyer.com> | 2023-09-30 11:25:55 -0400 |
commit | 7b599b6e10ab6e5fd3e7ec0c5b7d79a586375842 (patch) | |
tree | 212d9af3fd793814472aa3b93a6f4bbdfc3ec2d4 /modules/music | |
parent | 0d1276915ca8cdd9b1b65f8c11832d0d598c49af (diff) | |
download | nix-config-7b599b6e10ab6e5fd3e7ec0c5b7d79a586375842.tar.gz nix-config-7b599b6e10ab6e5fd3e7ec0c5b7d79a586375842.tar.bz2 nix-config-7b599b6e10ab6e5fd3e7ec0c5b7d79a586375842.zip |
add music module
Diffstat (limited to 'modules/music')
-rw-r--r-- | modules/music/default.nix | 3 | ||||
-rw-r--r-- | modules/music/mpd.nix | 34 |
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 + ]; + }; +} |