kavita
This commit is contained in:
@@ -51,7 +51,7 @@ let
|
||||
port = 8127;
|
||||
host = "0.0.0.0";
|
||||
openFirewall = cfg.openFirewall;
|
||||
model = "${cfg.configDir}/llama-cpp/models/${cfg.llama-cpp.model}.gguf";
|
||||
model = null;
|
||||
package = pkgs.llama-cpp-rocm;
|
||||
extraFlags = [
|
||||
"--fit"
|
||||
|
||||
@@ -5,24 +5,26 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.${namespace}.services.booklore;
|
||||
cfg = config.${namespace}.services.grimmory;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(lib.${namespace}.mkContainerService {
|
||||
inherit config;
|
||||
name = "booklore";
|
||||
image = "booklore/booklore";
|
||||
name = "grimmory";
|
||||
image = "ghcr.io/grimmory-tools/grimmory";
|
||||
internalPort = 6060;
|
||||
volumes = [
|
||||
"${cfg.configDir}/booklore:/app/data"
|
||||
"${cfg.configDir}/grimmory:/app/data"
|
||||
"${cfg.configDir}/bookdrop:/bookdrop"
|
||||
"${cfg.dataDir}/books:/books"
|
||||
];
|
||||
environment = {
|
||||
DATABASE_URL = "jdbc:mariadb://10.0.1.3:3306/booklore";
|
||||
DATABASE_USERNAME = "booklore";
|
||||
# TODO: move DATABASE_PASSWORD to a sops secret
|
||||
USER_ID = "1000";
|
||||
GROUP_ID = "1000";
|
||||
TZ = "UTC";
|
||||
DATABASE_URL = "jdbc:mariadb://10.0.1.3:3306/grimmory";
|
||||
DATABASE_USERNAME = "grimmory";
|
||||
DATABASE_PASSWORD = "Lucifer008!";
|
||||
};
|
||||
})
|
||||
41
modules/nixos/services/kavita/default.nix
Normal file
41
modules/nixos/services/kavita/default.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
name = "kavita";
|
||||
cfg = config.${namespace}.services.${name};
|
||||
rootUrl = "https://kavita.${namespace}.dev/";
|
||||
|
||||
kavitaConfig = lib.${namespace}.mkModule {
|
||||
inherit config name;
|
||||
description = "kavita";
|
||||
options = { };
|
||||
moduleConfig = {
|
||||
sops = {
|
||||
secrets = {
|
||||
"jallen-nas/kavita/token" = {
|
||||
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
|
||||
owner = config.users.users.kavita.name;
|
||||
group = config.users.users.kavita.group;
|
||||
restartUnits = [ "kavita.service" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
services.kavita = {
|
||||
enable = true;
|
||||
dataDir = "${cfg.configDir}/kavita";
|
||||
tokenKeyFile = config.sops.secrets."jallen-nas/kavita/token".path;
|
||||
settings = {
|
||||
Port = cfg.port;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [ kavitaConfig ];
|
||||
}
|
||||
@@ -34,7 +34,7 @@ let
|
||||
# Override mkModule's default port of 80 with lemonade's actual default.
|
||||
port = mkOpt lib.types.int 8000 "Port lemonade-router listens on";
|
||||
|
||||
host = mkOpt lib.types.str "127.0.0.1" "Address lemonade-router binds to";
|
||||
host = mkOpt lib.types.str "0.0.0.0" "Address lemonade-router binds to";
|
||||
|
||||
logLevel = mkOpt (lib.types.enum [
|
||||
"critical"
|
||||
|
||||
Reference in New Issue
Block a user