diff --git a/machines/lucia/configuration.nix b/machines/lucia/configuration.nix index 19fc522..cd4b846 100644 --- a/machines/lucia/configuration.nix +++ b/machines/lucia/configuration.nix @@ -22,21 +22,124 @@ time.timeZone = "Europe/Berlin"; services = { - mopidy = { - enable = true; - configuration = '' - [core] - restore_state = true - - [youtube] - allow_cache = true - youtube_dl_package = yt_dlp - ''; - extensionPackages = with pkgs; [ mopidy-muse mopidy-youtube python3Packages.yt-dlp ]; + dokuwiki.sites."wiki.malobeo.org" = { + enable = true; + aclUse = false; + #acl = "* @ALL 8"; # everyone can edit using this config + # note there is a users file at + # /var/lib/dokuwiki//users.auth.php + # makes sense to edit it by hand + superUser = "@admin"; + plugins = let + plugin-todo = pkgs.stdenv.mkDerivation { + name = "todo"; + src = pkgs.fetchFromGitHub { + owner = "leibler"; + repo = "dokuwiki-plugin-todo"; + rev = "7e36f4fffc46df9e2fd116d7d6dc326202530b71"; + sha256 = "sha256-o794cFdnVEUHvLRP/UzrD26fzNGa9gYzR7sw2Ns8tvo="; + }; + buildInputs = [ pkgs.unzip ]; + installPhase = "mkdir -p $out; cp -R * $out/"; + }; + in [ plugin-todo ]; + disableActions = "register"; + settings = { + title = "malobeo wiki"; + lang = "en"; }; }; - networking.firewall.allowedTCPPorts = [ 6680 ]; + mpd = { + enable = true; + musicDirectory = "/var/lib/mpd/music"; + extraConfig = '' + audio_output { + type "alsa" + name "My ALSA" + device "hw:0,0" # optional + format "44100:16:2" # optional + mixer_type "hardware" + mixer_device "default" + mixer_control "PCM" + } + ''; + + # Optional: + network.listenAddress = "any"; # if you want to allow non-localhost connections + startWhenNeeded = true; # systemd feature: only start MPD service upon connection to its socket + }; + + ympd = { + enable = true; + }; + #mopidy = { + # enable = true; + # configuration = '' + # [audio] + # output = alsasink + + # [http] + # enabled = true + # hostname = 127.0.0.1 + # port = 6680 + # allowed_origins = + # csrf_protection = true + # default_app = mopidy + + # [core] + # restore_state = true + + # [youtube] + # allow_cache = true + # youtube_dl_package = yt_dlp + + # [file] + # enabled = true + # media_dirs = + # /home/malobeo/music + # show_dotfiles = false + # excluded_file_extensions = + # .directory + # .html + # .jpeg + # .jpg + # .log + # .nfo + # .pdf + # .png + # .txt + # .zip + # follow_symlinks = false + # metadata_timeout = 1000 + + # [stream] + # enabled = true + # protocols = + # http + # https + # mms + # rtmp + # rtmps + # rtsp + # timeout = 5000 + # metadata_blacklist = + # ''; + # extensionPackages = with pkgs; [ mopidy-iris mopidy-youtube python3Packages.yt-dlp ]; + #}; + }; + + services.nginx = { + enable = true; + virtualHosts."music.malobeo.org" = { + locations."/" = { + proxyPass = "http://127.0.0.1:8080"; + proxyWebsockets = true; + }; + }; + }; + + networking.firewall.allowedTCPPorts = [ 6680 80 ]; environment.systemPackages = with pkgs; [ vim