summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2021-04-26 14:46:14 -0400
committerBen Sima <ben@bsima.me>2021-04-26 15:29:55 -0400
commitd2b49d5dda113d42a4d221be36ee3298c43350d3 (patch)
treec27d548241f14e73664c853f7fe7b603e1f0c84d
parente701ba92abdc62273d79fc358e8541ecc16d7d28 (diff)
add mpd service and {nc,}mpc client
-rw-r--r--lib/packages.nix2
-rw-r--r--linux.nix22
2 files changed, 24 insertions, 0 deletions
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" = {