finish up kiwix

This commit is contained in:
2026-07-30 12:36:53 -05:00
parent 4e0c40e83b
commit af3a35cdec
2 changed files with 25 additions and 8 deletions
+14 -8
View File
@@ -57,9 +57,12 @@ in {
home = cfg.data_dir; home = cfg.data_dir;
createHome = true; createHome = true;
group = service; group = service;
extraGroups = ["archives"]; extraGroups = ["media"];
}; };
# helpful and for scripts
environment.systemPackages = with pkgs; [kiwix-tools];
# enable the ${service} service # enable the ${service} service
services.kiwix-serve = { services.kiwix-serve = {
enable = true; enable = true;
@@ -67,7 +70,7 @@ in {
port = cfg.port; port = cfg.port;
user = service; user = service;
group = service; group = service;
library = cfg.data_dir; libraryPath = "${cfg.data_dir}/library.xml";
extraArgs = { extraArgs = {
}; };
}; };
@@ -91,12 +94,15 @@ in {
}; };
# add to glance (local service) # add to glance (local service)
homelab.glance.links.<category> = [{ homelab.glance.links.nomad = [
title = service; {
url = "https://${cfg.url}"; title = service;
error-url = "http://${homelab.host_ip}:${toString cfg.port}"; url = "https://${cfg.url}";
check-url = "http://${homelab.host_ip}:${toString cfg.port}"; error-url = "http://${homelab.host_ip}:${toString cfg.port}";
icon = "di:${service}"; }]; check-url = "http://${homelab.host_ip}:${toString cfg.port}";
icon = "di:${service}";
}
];
# sops.secrets = { # sops.secrets = {
# "${service}_" = { # "${service}_" = {
@@ -77,6 +77,11 @@ in {
default = []; default = [];
description = "list of links for ${service}"; description = "list of links for ${service}";
}; };
nomad = lib.mkOption {
type = lib.types.listOf lib.types.attrs;
default = [];
description = "list of links for ${service}";
};
}; };
}; };
@@ -244,6 +249,12 @@ in {
title = "system"; title = "system";
sites = cfg.links.system; sites = cfg.links.system;
} }
{
type = "monitor";
cache = "1m";
title = "system";
sites = cfg.links.nomad;
}
{ {
type = "custom-api"; type = "custom-api";
title = "recpro"; title = "recpro";