This commit is contained in:
marty 2026-05-19 12:48:51 +02:00
parent ce82b29a96
commit 9cac325698
9 changed files with 110 additions and 61 deletions

View file

@ -8,7 +8,7 @@
{
imports = [
./jellyfin.nix
./kavita.nix
./stump.nix
./navidrome.nix
];
}

View file

@ -1,49 +0,0 @@
{
config,
lib,
pkgs,
...
}:
{
options = {
server.media.kavita = {
enable = lib.mkEnableOption "enable kavita";
port = lib.mkOption {
default = 3812;
description = "kavita port";
};
public = lib.mkEnableOption "make kavita public";
subdomain = lib.mkOption {
default = "books";
description = "kavita subdomain";
};
};
};
config = {
services = {
kavita = {
enable = config.server.media.kavita.enable;
tokenKeyFile = "/home/${config.user.userName}/secrets/kavita";
settings = {
Port = config.server.media.kavita.port;
};
};
nginx = {
virtualHosts = {
"${config.server.media.kavita.subdomain}.${config.networking.domain}" =
if config.server.media.kavita.public then
{
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.server.media.kavita.port}";
};
}
else
{ };
};
};
};
};
}

View file

@ -0,0 +1,20 @@
{ inputs, ... }:
{
options = {
server.media.stump = {
enable = lib.mkEnableOption "enable stump";
public = lib.mkEnableOption "make stump public";
};
};
imports = [ inputs.stump-nix.nixosModules.stump ];
config = {
services.stump = {
enable = true;
environment = {
STUMP_PORT = "10801";
};
};
};
}