155 lines
3.6 KiB
Nix
155 lines
3.6 KiB
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
imports =
|
|
[ # Include the results of the hardware scan.
|
|
./hardware_configuration.nix
|
|
../modules/sshd.nix
|
|
../modules/malobeo_user.nix
|
|
];
|
|
|
|
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
|
|
boot.loader.grub.enable = false;
|
|
|
|
# Enables the generation of /boot/extlinux/extlinux.conf
|
|
boot.loader.generic-extlinux-compatible.enable = true;
|
|
|
|
|
|
networking.hostName = "lucia"; # Define your hostname.
|
|
networking.dhcpcd.enable = true;
|
|
|
|
# Set your time zone.
|
|
time.timeZone = "Europe/Berlin";
|
|
|
|
services = {
|
|
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/<wiki-name>/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";
|
|
};
|
|
};
|
|
|
|
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
|
|
htop
|
|
wget
|
|
git
|
|
pciutils
|
|
nix-tree
|
|
];
|
|
|
|
system.stateVersion = "23.05";
|
|
}
|