From c3e832593259a89b8d8802db807efccdc9307647 Mon Sep 17 00:00:00 2001 From: Dmitriy Kholkin Date: Sat, 30 Dec 2023 04:42:09 +0300 Subject: [PATCH] add inpx-web to hypervisor --- machines/Home-Hypervisor/default.nix | 1 + machines/Home-Hypervisor/dns-headscale.nix | 2 ++ machines/Home-Hypervisor/dns-mapping.nix | 1 + profiles/servers/inpx-web.nix | 18 ++++++++++++++++++ profiles/servers/nginx.nix | 4 ++++ 5 files changed, 26 insertions(+) create mode 100644 profiles/servers/inpx-web.nix diff --git a/machines/Home-Hypervisor/default.nix b/machines/Home-Hypervisor/default.nix index f94c936..da509f4 100644 --- a/machines/Home-Hypervisor/default.nix +++ b/machines/Home-Hypervisor/default.nix @@ -26,6 +26,7 @@ in { customProfiles.media-stack # customProfiles.copyparty + customProfiles.inpx-web customProfiles.seafile customProfiles.spdf # customProfiles.cocalc diff --git a/machines/Home-Hypervisor/dns-headscale.nix b/machines/Home-Hypervisor/dns-headscale.nix index 05e4503..c037714 100644 --- a/machines/Home-Hypervisor/dns-headscale.nix +++ b/machines/Home-Hypervisor/dns-headscale.nix @@ -23,6 +23,7 @@ { name = "joplin.ataraxiadev.com"; type = "A"; value = "100.64.0.3"; } { name = "kavita.ataraxiadev.com"; type = "A"; value = "100.64.0.3"; } { name = "ldap.ataraxiadev.com"; type = "A"; value = "100.64.0.3"; } + { name = "lib.ataraxiadev.com"; type = "A"; value = "100.64.0.3"; } # { name = "mail.ataraxiadev.com"; type = "A"; value = "100.64.0.3"; } { name = "matrix.ataraxiadev.com"; type = "A"; value = "100.64.0.3"; } { name = "medusa.ataraxiadev.com"; type = "A"; value = "100.64.0.3"; } @@ -69,6 +70,7 @@ { name = "joplin.ataraxiadev.com"; type = "AAAA"; value = "fd7a:115c:a1e0::3"; } { name = "kavita.ataraxiadev.com"; type = "AAAA"; value = "fd7a:115c:a1e0::3"; } { name = "ldap.ataraxiadev.com"; type = "AAAA"; value = "fd7a:115c:a1e0::3"; } + { name = "lib.ataraxiadev.com"; type = "AAAA"; value = "fd7a:115c:a1e0::3"; } # { name = "mail.ataraxiadev.com"; type = "AAAA"; value = "fd7a:115c:a1e0::3"; } { name = "matrix.ataraxiadev.com"; type = "AAAA"; value = "fd7a:115c:a1e0::3"; } { name = "medusa.ataraxiadev.com"; type = "AAAA"; value = "fd7a:115c:a1e0::3"; } diff --git a/machines/Home-Hypervisor/dns-mapping.nix b/machines/Home-Hypervisor/dns-mapping.nix index e878cee..ade6b5f 100644 --- a/machines/Home-Hypervisor/dns-mapping.nix +++ b/machines/Home-Hypervisor/dns-mapping.nix @@ -22,6 +22,7 @@ "/joplin.ataraxiadev.com/192.168.0.10" "/kavita.ataraxiadev.com/192.168.0.10" "/ldap.ataraxiadev.com/192.168.0.10" + "/lib.ataraxiadev.com/192.168.0.10" "/matrix.ataraxiadev.com/192.168.0.10" "/medusa.ataraxiadev.com/192.168.0.10" "/microbin.ataraxiadev.com/192.168.0.10" diff --git a/profiles/servers/inpx-web.nix b/profiles/servers/inpx-web.nix new file mode 100644 index 0000000..a749358 --- /dev/null +++ b/profiles/servers/inpx-web.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, ... }: let + nas-path = "/media/nas/media-stack"; +in { + virtualisation.oci-containers.containers.inpx-web = { + autoStart = true; + image = "docker.io/ataraxiadev/inpx-web:latest"; + ports = [ "127.0.0.1:8072:12380/tcp" ]; + user = "1000:100"; + volumes = [ + "${nas-path}/media/other/flibusta:/library:ro" + "${nas-path}/configs/inpx-web:/app/data" + ]; + }; + + systemd.tmpfiles.rules = [ + "d ${nas-path}/configs/inpx-web 0755 1000 100 -" + ]; +} \ No newline at end of file diff --git a/profiles/servers/nginx.nix b/profiles/servers/nginx.nix index 7bc54e1..d685e16 100644 --- a/profiles/servers/nginx.nix +++ b/profiles/servers/nginx.nix @@ -90,6 +90,7 @@ in { "wg.ataraxiadev.com" "wiki.ataraxiadev.com" "pdf.ataraxiadev.com" + "lib.ataraxiadev.com" "matrix.ataraxiadev.com" "dimension.ataraxiadev.com" @@ -300,6 +301,9 @@ in { "pdf.ataraxiadev.com" = default // authentik { proxyPass = "http://127.0.0.1:8071"; }; + "lib.ataraxiadev.com" = default // authentik { + proxyPass = "http://127.0.0.1:8072"; + }; "medusa.ataraxiadev.com" = { locations."/" = { proxyPass = "http://127.0.0.1:8180";