server and other shit
This commit is contained in:
parent
270e1a0be4
commit
804371bf96
65 changed files with 1428 additions and 619 deletions
66
modules/server/media/navidrome.nix
Normal file
66
modules/server/media/navidrome.nix
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options = {
|
||||
server.media.navidrome = {
|
||||
enable = lib.mkEnableOption "enable navidrome";
|
||||
port = lib.mkOption {
|
||||
default = 4533;
|
||||
description = "navidrome port";
|
||||
};
|
||||
public = lib.mkEnableOption "make navidrome public";
|
||||
subdomain = lib.mkOption {
|
||||
default = "music";
|
||||
description = "navidrome subdomain";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = {
|
||||
services = {
|
||||
navidrome = {
|
||||
enable = config.server.media.navidrome.enable;
|
||||
user = config.user.userName;
|
||||
group = "users";
|
||||
settings = {
|
||||
Address = "0.0.0.0";
|
||||
Port = config.server.media.navidrome.port;
|
||||
MusicFolder = "/mnt/Data/Media/Music";
|
||||
Agents = "lastfm";
|
||||
AlbumPlayCountMode = "normalized";
|
||||
EnableDownloads = true;
|
||||
EnableFavourites = true;
|
||||
EnableNowPlaying = true;
|
||||
EnableStarRating = true;
|
||||
EnableUserEditing = true;
|
||||
LastFM.Enabled = true;
|
||||
LastFM.Language = "en";
|
||||
LastFM.ScrobbleFirstArtistOnly = false;
|
||||
ListenBrainz.Enabled = true;
|
||||
Scanner.Enabled = true;
|
||||
Scanner.Schedule = "1h";
|
||||
Subsonic.ArtistParticipations = true;
|
||||
};
|
||||
};
|
||||
nginx = {
|
||||
virtualHosts = {
|
||||
"${config.server.media.navidrome.subdomain}.${config.networking.domain}" =
|
||||
if config.server.media.navidrome.public then
|
||||
{
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.server.media.navidrome.port}";
|
||||
};
|
||||
}
|
||||
else
|
||||
{ };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue