Compare commits
No commits in common. "714198cd1012f64fd4a4a1038c4ee84f162a660e" and "accfdc159c8edea1af03a0b4ec8efefa683e7343" have entirely different histories.
714198cd10
...
accfdc159c
|
@ -3,7 +3,6 @@
|
|||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./mopidy.nix
|
||||
];
|
||||
|
||||
beatific.hostName = "catacomb";
|
||||
|
@ -33,7 +32,7 @@
|
|||
hostId = "beeeeee5"; # this must be consistent for ZFS
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 80 139 445 ];
|
||||
allowedTCPPorts = [ 139 445 ];
|
||||
allowedUDPPorts = [ 137 138 ];
|
||||
};
|
||||
wireless = {
|
||||
|
@ -56,27 +55,6 @@
|
|||
|
||||
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 = {
|
||||
uid = 1001;
|
||||
extraGroups = [
|
||||
|
|
|
@ -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
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -32,9 +32,64 @@
|
|||
];
|
||||
|
||||
users.users.tvb.extraGroups = [
|
||||
"mopidy"
|
||||
"networkmanager"
|
||||
"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";
|
||||
}
|
||||
|
|
|
@ -239,7 +239,7 @@ in {
|
|||
];
|
||||
"10.22.20.2" = [
|
||||
"catacomb.home"
|
||||
"mopidy.home.ktvb.site"
|
||||
"mirror.catacomb.home"
|
||||
];
|
||||
"10.22.20.3" = [
|
||||
"palamas.home"
|
||||
|
@ -255,6 +255,7 @@ in {
|
|||
];
|
||||
"10.22.20.7" = [
|
||||
"centroid.home"
|
||||
"mopidy.home.ktvb.site"
|
||||
];
|
||||
"10.22.20.8" = [
|
||||
"backyard.home"
|
||||
|
|
Loading…
Reference in New Issue