kilgharrah: serve navidrome

This commit is contained in:
Katherina Walshe-Grey 2024-10-08 01:28:49 +01:00
parent 2a2f1674a3
commit 82787cea45
3 changed files with 46 additions and 0 deletions

View file

@ -3,6 +3,7 @@
./actual.nix
./forgejo.nix
./jellyfin.nix
./navidrome.nix
./pipewire-low-latency.nix
];
}

38
services/navidrome.nix Normal file
View file

@ -0,0 +1,38 @@
{ config, lib, pkgs, ... }:
let
inherit (lib) mkIf mkOption mkEnableOption types;
cfg = config.qenya.services.navidrome;
in
{
options.qenya.services.navidrome = {
enable = mkEnableOption "Navidrome";
domain = mkOption {
type = types.str;
};
dataDir = mkOption {
type = types.str;
};
};
config = mkIf cfg.enable {
services.nginx = {
enable = true;
virtualHosts = {
${cfg.domain} = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://127.0.0.1:4533/";
};
};
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
services.navidrome.enable = true;
services.navidrome.settings = {
MusicFolder = cfg.dataDir;
BaseUrl = "https://${cfg.domain}";
};
};
}