kilgharrah: serve navidrome
This commit is contained in:
parent
2a2f1674a3
commit
82787cea45
3 changed files with 46 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
./actual.nix
|
||||
./forgejo.nix
|
||||
./jellyfin.nix
|
||||
./navidrome.nix
|
||||
./pipewire-low-latency.nix
|
||||
];
|
||||
}
|
38
services/navidrome.nix
Normal file
38
services/navidrome.nix
Normal 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}";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue