mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 07:53:55 -05:00
navidrome: configurable port
This commit is contained in:
parent
ae075c58d1
commit
678f551246
|
@ -2,6 +2,7 @@
|
|||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
|
@ -12,13 +13,21 @@
|
|||
default = "/mnt/Media/Music";
|
||||
type = lib.types.str;
|
||||
};
|
||||
alyraffauf.containers.nixos.navidrome.port = lib.mkOption {
|
||||
description = "Port for Navidrome.";
|
||||
default = 4533;
|
||||
type = lib.types.int;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.alyraffauf.containers.nixos.navidrome.enable {
|
||||
containers.navidrome = {
|
||||
autoStart = true;
|
||||
bindMounts."/Music".hostPath = config.alyraffauf.containers.nixos.navidrome.musicDirectory;
|
||||
config = {
|
||||
config = let
|
||||
port = config.alyraffauf.containers.nixos.navidrome.port;
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
|
@ -30,7 +39,7 @@
|
|||
openFirewall = true;
|
||||
settings = {
|
||||
Address = "0.0.0.0";
|
||||
Port = 4533;
|
||||
Port = port;
|
||||
MusicFolder = "/Music";
|
||||
DefaultTheme = "Auto";
|
||||
SubsonicArtistParticipations = true;
|
||||
|
|
Loading…
Reference in a new issue