From d2b49d5dda113d42a4d221be36ee3298c43350d3 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 26 Apr 2021 14:46:14 -0400 Subject: add mpd service and {nc,}mpc client --- lib/packages.nix | 2 ++ linux.nix | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/lib/packages.nix b/lib/packages.nix index 4cc6fda..e74697a 100644 --- a/lib/packages.nix +++ b/lib/packages.nix @@ -48,7 +48,9 @@ jq lsof material-icons mononoki +mpc_cli ncdu +ncmpc nix-prefetch-scripts noto-fonts-emoji opentimestamps-client diff --git a/linux.nix b/linux.nix index 7cf6a98..0e600d7 100644 --- a/linux.nix +++ b/linux.nix @@ -179,6 +179,25 @@ in postExec = "${pkgs.notmuch}/bin/notmuch new"; }; + mpd = { + enable = true; + musicDirectory = "/mnt/campbell/ben/music"; + network = { + listenAddress = "0.0.0.0"; + port = 6600; + }; + extraConfig = '' + audio_output { + type "httpd" + name "HTTP Stream" + encoder "vorbis" + port "8097" + quality "7.0" + format "44100:16:2" + } + ''; + }; + polybar = { # https://github.com/0x746866/dots/blob/master/polybar/config enable = true; @@ -417,6 +436,9 @@ in systemd.user = { services = { "gpg-refresh".Service.ExecStart = "${pkgs.gnupg}/bin/gpg --refresh"; + # make it the same as 'systemctl show mpd | grep LimitMEMLOCK" + # might not be necessary? + #mpd.Service.LimitMEMLOCK = "2085444096"; }; timers = { "gpg-refresh" = { -- cgit v1.2.3