Enable mopidy and virtualisation via QEMU/KVM
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Enable ALSA
|
||||
sound.enable = true;
|
||||
# Enable ALSA
|
||||
sound.enable = true;
|
||||
|
||||
# Configure PulseAudio with mopidy tweaks
|
||||
# Configure PulseAudio with mopidy tweaks
|
||||
hardware.pulseaudio = {
|
||||
enable = true;
|
||||
tcp = {
|
||||
@@ -12,4 +12,60 @@
|
||||
anonymousClients.allowedIpRanges = [ "127.0.0.1" ];
|
||||
};
|
||||
};
|
||||
|
||||
# Set up Mopidy
|
||||
services.mopidy = {
|
||||
enable = true;
|
||||
extensionPackages =
|
||||
[ pkgs.mopidy-mpd pkgs.mopidy-soundcloud pkgs.mopidy-youtube ];
|
||||
configuration = ''
|
||||
[core]
|
||||
cache_dir = $XDG_CACHE_DIR/cache/mopidy
|
||||
config_dir = $XDG_CONFIG_DIR/mopidy
|
||||
data_dir = $XDG_DATA_DIR/lib/mopidy
|
||||
|
||||
[logging]
|
||||
config_file = $XDG_CONFIG_DIR/mopidy/logging.conf
|
||||
|
||||
[audio]
|
||||
mixer = software
|
||||
mixer_volume =
|
||||
output = pulsesink server=127.0.0.1
|
||||
visualizer =
|
||||
|
||||
[file]
|
||||
enabled = true
|
||||
media_dirs = /home/coolneng/Music
|
||||
excluded_file_extensions =
|
||||
.directory
|
||||
.html
|
||||
.jpeg
|
||||
.jpg
|
||||
.log
|
||||
.nfo
|
||||
.png
|
||||
.txt
|
||||
|
||||
[mpd]
|
||||
enabled = true
|
||||
hostname = 127.0.0.1
|
||||
port = 6600
|
||||
password =
|
||||
max_connections = 20
|
||||
zeroconf = ""
|
||||
|
||||
[http]
|
||||
enabled = false
|
||||
|
||||
[soundcloud]
|
||||
enabled = false
|
||||
|
||||
[m3u]
|
||||
playlists_dir = /home/coolneng/.config/mpd/playlists
|
||||
base_dir = /home/coolneng/Music
|
||||
'';
|
||||
};
|
||||
|
||||
# Give permissions to mopidy user
|
||||
users.users.mopidy = { extraGroups = [ "audio" ]; };
|
||||
}
|
||||
|
||||
@@ -3,4 +3,7 @@
|
||||
{
|
||||
# Improve nix-shell and direnv integration
|
||||
services.lorri.enable = true;
|
||||
|
||||
# Enable virtualization
|
||||
virtualisation.libvirtd.enable = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user