cleanup
This commit is contained in:
@@ -76,7 +76,6 @@ let
|
||||
host = "0.0.0.0";
|
||||
port = 8888;
|
||||
openFirewall = cfg.openFirewall;
|
||||
# stateDir = "/media/nas/main/nix-app-data/open-webui";
|
||||
environmentFile = config.sops.secrets."jallen-nas/open-webui".path;
|
||||
environment = {
|
||||
OPENID_PROVIDER_URL = "https://authentik.mjallen.dev/application/o/chat/.well-known/openid-configuration";
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
name = "calibre";
|
||||
cfg = config.${namespace}.services.${name};
|
||||
cfgWeb = config.${namespace}.services."${name}-web";
|
||||
|
||||
calibreConfig = lib.${namespace}.mkModule {
|
||||
inherit config name;
|
||||
@@ -16,15 +16,11 @@ let
|
||||
description = "Calibre Server";
|
||||
options = { };
|
||||
moduleConfig = {
|
||||
services = {
|
||||
calibre-server = {
|
||||
enable = false;
|
||||
openFirewall = true;
|
||||
port = cfg.port;
|
||||
libraries = [
|
||||
"${cfg.dataDir}/books"
|
||||
];
|
||||
};
|
||||
services.calibre-server = {
|
||||
enable = false;
|
||||
openFirewall = true;
|
||||
port = cfg.port;
|
||||
libraries = [ "${cfg.dataDir}/books" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -39,15 +35,15 @@ let
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
package = pkgs.stable.calibre-web;
|
||||
dataDir = "${cfg.configDir}/calibre-web";
|
||||
dataDir = "${cfgWeb.configDir}/calibre-web";
|
||||
listen = {
|
||||
ip = "0.0.0.0";
|
||||
port = cfg.port;
|
||||
port = cfgWeb.port;
|
||||
};
|
||||
options = {
|
||||
enableBookUploading = true;
|
||||
enableBookConversion = true;
|
||||
calibreLibrary = "${cfg.dataDir}/books";
|
||||
calibreLibrary = "${cfgWeb.dataDir}/books";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -11,7 +11,13 @@ let
|
||||
glanceConfig = lib.${namespace}.mkModule {
|
||||
inherit config name;
|
||||
description = "glance";
|
||||
options = { };
|
||||
options = {
|
||||
nasPoolPath = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = cfg.dataDir;
|
||||
description = "Path to the NAS pool mount to display in server-stats.";
|
||||
};
|
||||
};
|
||||
moduleConfig = {
|
||||
sops = {
|
||||
secrets = {
|
||||
@@ -75,7 +81,7 @@ let
|
||||
"/home" = {
|
||||
name = "Home";
|
||||
};
|
||||
"/media/nas/main" = {
|
||||
"${cfg.nasPoolPath}" = {
|
||||
name = "nas_pool";
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user