inherit abook khard khal;
inherit graphicsmagick;
inherit youtube-dl;
- inherit ncmpc;
+ inherit ncmpc ncmpcpp;
inherit cadaver;
inherit mairix notmuch;
inherit ctags;
./modules/certificates.nix
./modules/gitolite
./modules/databases
+ ./modules/mpd
./modules/websites
./modules/mail
./modules/ftp
--- /dev/null
+{ lib, pkgs, config, myconfig, mylibs, ... }:
+{
+ config = {
+ networking.firewall.allowedTCPPorts = [ 6600 ];
+ users.users.mpd.extraGroups = [ "wwwrun" ];
+ services.mpd = {
+ enable = true;
+ network.listenAddress = "any";
+ musicDirectory = myconfig.env.mpd.folder;
+ extraConfig = ''
+ password "${myconfig.env.mpd.password}@read,add,control,admin"
+ audio_output {
+ type "null"
+ name "No Output"
+ mixer_type "none"
+ }
+ audio_output {
+ type "httpd"
+ name "OGG"
+ encoder "vorbis"
+ port "${myconfig.env.ports.mpd_ogg}"
+ bind_to_address "127.0.0.1"
+ quality "5.0"
+ format "44100:16:1"
+ }
+ audio_output {
+ type "httpd"
+ name "MP3"
+ encoder "lame"
+ port "${myconfig.env.ports.mpd_mp3}"
+ bind_to_address "127.0.0.1"
+ quality "5.0"
+ format "44100:16:1"
+ }
+
+
+ '';
+ };
+ };
+}
+
dokuwiki = dokuwiki.activationScript;
};
+ nixpkgs.config.packageOverrides = oldpkgs: rec {
+ ympd = oldpkgs.ympd.overrideAttrs(old: mylibs.fetchedGithub ./ympd.json);
+ };
+
systemd.services.tt-rss = {
description = "Tiny Tiny RSS feeds update daemon";
serviceConfig = {
--- /dev/null
+{
+ "tag": "612f8fc-master",
+ "meta": {
+ "name": "ympd",
+ "url": "https://github.com/notandy/ympd",
+ "branch": "master"
+ },
+ "github": {
+ "owner": "notandy",
+ "repo": "ympd",
+ "rev": "612f8fc0b2c47fc89d403e4a044541c6b2b238c8",
+ "sha256": "01hnj10zl103mrn82vyd42fvq7w5az3jf1qz18889zv67kn73ll9",
+ "fetchSubmodules": true
+ }
+}
ympd = rec {
config = {
webPort = "localhost:${env.listenPort}";
- mpd = env.mpd;
+ mpd = {
+ host = "${env.mpd.host} --mpdpass ${env.mpd.password}";
+ port = env.mpd.port;
+ };
};
apache = {
modules = [
"proxy_wstunnel"
];
vhostConf = ''
- <LocationMatch "^/mpd">
+ <LocationMatch "^/mpd(?!/music.(mp3|ogg))">
Use LDAPConnect
Require ldap-group cn=users,cn=mpd,ou=services,dc=immae,dc=eu
</LocationMatch>
<Location "/mpd/ws">
ProxyPass ws://${config.webPort}/ws
</Location>
+ <Location "/mpd/music.mp3">
+ ProxyPass http://localhost:${env.mp3port}/
+ ProxyPassReverse http://localhost:${env.mp3port}/
+ </Location>
+ <Location "/mpd/music.ogg">
+ ProxyPass http://localhost:${env.oggport}/
+ ProxyPassReverse http://localhost:${env.oggport}/
+ </Location>
'';
};
};