From 19bccbbbebca971658ca8542f0675eaa7a122e5b Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 10 Oct 2024 01:59:02 +0000 Subject: [PATCH] kiwix-serve: obtain wikipedia zim via nix, instead of being stateful --- hosts/by-name/servo/services/kiwix-serve.nix | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/hosts/by-name/servo/services/kiwix-serve.nix b/hosts/by-name/servo/services/kiwix-serve.nix index c3e9e65b7..2d03c4f73 100644 --- a/hosts/by-name/servo/services/kiwix-serve.nix +++ b/hosts/by-name/servo/services/kiwix-serve.nix @@ -1,19 +1,11 @@ -# how to update wikipedia snapshot: -# - browse for later snapshots: -# - -# - DL directly, or via rsync (resumable): -# - `rsync --progress --append-verify rsync://mirror.accum.se/mirror/wikimedia.org/other/kiwix/zim/wikipedia/wikipedia_en_all_maxi_2022-05.zim .` - -{ ... }: +{ pkgs, ... }: { - sane.persist.sys.byStore.ext = [ - { user = "colin"; group = "users"; path = "/var/lib/kiwix"; method = "bind"; } - ]; - sane.services.kiwix-serve = { enable = true; port = 8013; - zimPaths = [ "/var/lib/kiwix/wikipedia_en_all_maxi_2023-11.zim" ]; + zimPaths = [ + "${pkgs.zimPackages.wikipedia_en_all_maxi}/share/zim/wikipedia_en_all_maxi.zim" + ]; }; services.nginx.virtualHosts."w.uninsane.org" = {