Compare commits
No commits in common. "fe720b2de36a2df88c75d66eb817e1d6b4a8d9e7" and "1335bbfe9d6f4d29464f2dc75106aff1f354602e" have entirely different histories.
fe720b2de3
...
1335bbfe9d
|
@ -80,11 +80,6 @@ in
|
|||
builtins.toFile "grafana.txt" my.secrets.monitoring.password; # Insecure, I don't care
|
||||
};
|
||||
};
|
||||
# FLOSS music streaming server
|
||||
navidrome = {
|
||||
enable = true;
|
||||
musicFolder = "/data/media/music";
|
||||
};
|
||||
# Nextcloud self-hosted cloud
|
||||
nextcloud = {
|
||||
enable = true;
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
./matrix.nix
|
||||
./miniflux.nix
|
||||
./monitoring.nix
|
||||
./navidrome.nix
|
||||
./nextcloud.nix
|
||||
./nginx.nix
|
||||
./pirate.nix
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
# A FLOSS self-hosted, subsonic compatible music server
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.my.services.navidrome;
|
||||
domain = config.networking.domain;
|
||||
navidromeDomain = "music.${config.networking.domain}";
|
||||
in
|
||||
{
|
||||
options.my.services.navidrome = with lib; {
|
||||
enable = mkEnableOption "Navidrome Music Server";
|
||||
|
||||
settings = mkOption {
|
||||
type = (pkgs.formats.json { }).type;
|
||||
default = { };
|
||||
example = {
|
||||
"LastFM.ApiKey" = "MYKEY";
|
||||
"LastFM.Secret" = "MYSECRET";
|
||||
"Spotify.ID" = "MYKEY";
|
||||
"Spotify.Secret" = "MYSECRET";
|
||||
};
|
||||
description = ''
|
||||
Additional settings.
|
||||
'';
|
||||
};
|
||||
|
||||
privatePort = mkOption {
|
||||
type = types.port;
|
||||
default = 4533;
|
||||
example = 8080;
|
||||
description = "Internal port for webui";
|
||||
};
|
||||
|
||||
musicFolder = mkOption {
|
||||
type = types.str;
|
||||
example = "/mnt/music/";
|
||||
description = "Music folder";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.navidrome = {
|
||||
enable = true;
|
||||
|
||||
settings = cfg.settings // {
|
||||
Port = cfg.privatePort;
|
||||
Address = "127.0.0.1"; # Behind reverse proxy, so only loopback
|
||||
MusicFolder = cfg.musicFolder;
|
||||
LogLevel = "info";
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."${navidromeDomain}" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = domain;
|
||||
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString cfg.privatePort}/";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue