stump
This commit is contained in:
parent
ce82b29a96
commit
9cac325698
9 changed files with 110 additions and 61 deletions
|
|
@ -30,7 +30,7 @@
|
|||
enable = true;
|
||||
public = false;
|
||||
};
|
||||
kavita = {
|
||||
stump = {
|
||||
enable = true;
|
||||
public = false;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
{
|
||||
imports = [
|
||||
./jellyfin.nix
|
||||
./kavita.nix
|
||||
./stump.nix
|
||||
./navidrome.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{ };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
20
modules/server/media/stump.nix
Normal file
20
modules/server/media/stump.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue