1
1
Fork 0

Compare commits

..

No commits in common. "714198cd1012f64fd4a4a1038c4ee84f162a660e" and "accfdc159c8edea1af03a0b4ec8efefa683e7343" have entirely different histories.

4 changed files with 58 additions and 63 deletions

View File

@ -3,7 +3,6 @@
{ {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./mopidy.nix
]; ];
beatific.hostName = "catacomb"; beatific.hostName = "catacomb";
@ -33,7 +32,7 @@
hostId = "beeeeee5"; # this must be consistent for ZFS hostId = "beeeeee5"; # this must be consistent for ZFS
firewall = { firewall = {
enable = true; enable = true;
allowedTCPPorts = [ 80 139 445 ]; allowedTCPPorts = [ 139 445 ];
allowedUDPPorts = [ 137 138 ]; allowedUDPPorts = [ 137 138 ];
}; };
wireless = { wireless = {
@ -56,27 +55,6 @@
services.rsyncd.enable = true; services.rsyncd.enable = true;
services.nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts = {
default = {
default = true;
locations."/".return = "444";
};
"mopidy.home.ktvb.site" = {
listen = [
{ addr = "10.22.20.2"; }
{ addr = "catacomb.lan"; }
];
locations."/" = {
proxyWebsockets = true;
proxyPass = "https://localhost:6680";
};
};
};
};
users.users.tvb = { users.users.tvb = {
uid = 1001; uid = 1001;
extraGroups = [ extraGroups = [

View File

@ -1,39 +0,0 @@
{ pkgs, ... }:
{
users.users.tvb.extraGroups = [
"mopidy"
];
users.groups.mopidy = {}; # rw group for media directory
users.users.mopidy.extraGroups = [
"mopidy"
"pipewire" # necessary to allow the system service to play sound
];
services.mopidy = let
mopidyPackages' = pkgs.mopidyPackages.overrideScope (prev: final: { extraPkgs = pkgs: [ pkgs.yt-dlp ]; });
in {
enable = true;
extensionPackages = with mopidyPackages'; [
mopidy-bandcamp
mopidy-jellyfin
mopidy-musicbox-webclient
mopidy-youtube
];
configuration = ''
[file]
media_dirs =
/media/music|Music
[jellyfin]
hostname = jellyfin.home.ktvb.site
username = mopidy
password = mopidy
libraries = Music,Weird Song Halftime
album_format = {Name} ({ProductionYear})
[youtube]
youtube_dl_package = yt_dlp
'';
};
}

View File

@ -32,9 +32,64 @@
]; ];
users.users.tvb.extraGroups = [ users.users.tvb.extraGroups = [
"mopidy"
"networkmanager" "networkmanager"
"pipewire" "pipewire"
]; ];
users.groups.mopidy = {}; # rw group for media directory
users.users.mopidy.extraGroups = [
"mopidy"
"pipewire" # necessary to allow the system service to play sound
];
services.mopidy = let
mopidyPackages' = pkgs.mopidyPackages.overrideScope (prev: final: { extraPkgs = pkgs: [ pkgs.yt-dlp ]; });
in {
enable = true;
extensionPackages = with mopidyPackages'; [
mopidy-bandcamp
mopidy-jellyfin
mopidy-musicbox-webclient
mopidy-youtube
];
configuration = ''
[file]
media_dirs =
/media/music|Music
[jellyfin]
hostname = jellyfin.home.ktvb.site
username = mopidy
password = mopidy
libraries = Music,Weird Song Halftime
album_format = {Name} ({ProductionYear})
[youtube]
youtube_dl_package = yt_dlp
'';
};
services.nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts = {
default = {
default = true;
locations."/".return = "444";
};
"mopidy.home.ktvb.site" = {
listen = [
{ addr = "10.22.20.7"; }
{ addr = "centroid.lan"; }
];
locations."/" = {
proxyWebsockets = true;
proxyPass = "http://localhost:6680";
};
};
};
};
networking.firewall.allowedTCPPorts = [ 80 ];
system.stateVersion = "23.11"; system.stateVersion = "23.11";
} }

View File

@ -239,7 +239,7 @@ in {
]; ];
"10.22.20.2" = [ "10.22.20.2" = [
"catacomb.home" "catacomb.home"
"mopidy.home.ktvb.site" "mirror.catacomb.home"
]; ];
"10.22.20.3" = [ "10.22.20.3" = [
"palamas.home" "palamas.home"
@ -255,6 +255,7 @@ in {
]; ];
"10.22.20.7" = [ "10.22.20.7" = [
"centroid.home" "centroid.home"
"mopidy.home.ktvb.site"
]; ];
"10.22.20.8" = [ "10.22.20.8" = [
"backyard.home" "backyard.home"