kilgharrah: serve navidrome
This commit is contained in:
parent
2a2f1674a3
commit
82787cea45
|
@ -50,14 +50,21 @@
|
|||
enable = true;
|
||||
domain = "jellyfin.qenya.tel";
|
||||
};
|
||||
qenya.services.navidrome = {
|
||||
enable = true;
|
||||
domain = "music.qenya.tel";
|
||||
dataDir = "/srv/music";
|
||||
};
|
||||
|
||||
randomcat.services.zfs.datasets = {
|
||||
"rpool_albion/data" = { mountpoint = "none"; };
|
||||
"rpool_albion/data/steam" = { mountpoint = "/home/qenya/.local/share/Steam"; };
|
||||
"rpool_albion/state" = { mountpoint = "none"; };
|
||||
"rpool_albion/state/jellyfin" = { mountpoint = "/var/lib/jellyfin"; };
|
||||
"rpool_albion/state/navidrome" = { mountpoint = "/var/lib/navidrome"; };
|
||||
"rpool_albion/srv" = { mountpoint = "none"; };
|
||||
"rpool_albion/srv/jellyfin" = { mountpoint = "/srv/jellyfin"; };
|
||||
"rpool_albion/srv/music" = { mountpoint = "/srv/music"; };
|
||||
};
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
|
|
|
@ -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…
Reference in a new issue