From e1c8a8daadb19d339e2bd8c0a93a06a0b2a304c2 Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Tue, 5 Nov 2024 14:58:06 -0600 Subject: [PATCH] substitute nextcloud for photoprism --- boxes/copernicus/services/default.nix | 2 +- boxes/copernicus/services/nextcloud.nix | 24 +++++++++++++++++++ boxes/netbox/default.nix | 2 +- ...oprism-bridge.nix => nextcloud-bridge.nix} | 4 ++-- 4 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 boxes/copernicus/services/nextcloud.nix rename boxes/netbox/{photoprism-bridge.nix => nextcloud-bridge.nix} (74%) diff --git a/boxes/copernicus/services/default.nix b/boxes/copernicus/services/default.nix index f539ace..0be66ee 100644 --- a/boxes/copernicus/services/default.nix +++ b/boxes/copernicus/services/default.nix @@ -2,8 +2,8 @@ { imports = [ - ./photoprism.nix ./wireguard.nix ./grafana.nix + ./nextcloud.nix ]; } diff --git a/boxes/copernicus/services/nextcloud.nix b/boxes/copernicus/services/nextcloud.nix new file mode 100644 index 0000000..f14eaee --- /dev/null +++ b/boxes/copernicus/services/nextcloud.nix @@ -0,0 +1,24 @@ +{ lib, config, pkgs, ...}: + +{ + services.nextcloud = { + enable = true; + package = pkgs.nextcloud30; + hostName = "nextcloud.beepboop.systems"; + config.adminpassFile = "/etc/nextcloud-admin"; + extraApps = { + inherit (config.services.nextcloud.package.packages.apps) contacts calendar tasks; + phonetrack = pkgs.fetchNextcloudApp { + sha256 = "sha256-V92f+FiS5vZEkq15A51pHoDpUOBfUOEVIcsXdP/rSMQ="; + license = "agpl3Only"; + url = "https://github.com/julien-nc/phonetrack/releases/download/v0.8.1/phonetrack-0.8.1.tar.gz"; + }; + }; + extraAppsEnable = true; + }; + + services.nginx.virtualHosts."${config.services.nextcloud.hostName}".listen = [ { + addr = "10.100.0.2"; + port = 5028; + } ]; +} diff --git a/boxes/netbox/default.nix b/boxes/netbox/default.nix index 947c3c2..84d4df2 100644 --- a/boxes/netbox/default.nix +++ b/boxes/netbox/default.nix @@ -17,7 +17,7 @@ ./nginx.nix ./franklincce.nix ./wireguard.nix - ./photoprism-bridge.nix + ./nextcloud-bridge.nix ./grafana-bridge.nix ./prometheus.nix ./socks.nix diff --git a/boxes/netbox/photoprism-bridge.nix b/boxes/netbox/nextcloud-bridge.nix similarity index 74% rename from boxes/netbox/photoprism-bridge.nix rename to boxes/netbox/nextcloud-bridge.nix index 3d1213c..712255f 100644 --- a/boxes/netbox/photoprism-bridge.nix +++ b/boxes/netbox/nextcloud-bridge.nix @@ -1,10 +1,10 @@ { lib, config, pkgs, ... }: { - services.nginx.virtualHosts."photos.beepboop.systems" = { + services.nginx.virtualHosts."nextcloud.beepboop.systems" = { forceSSL = true; enableACME = true; locations."/" = { - proxyPass = "http://10.100.0.2:2342"; + proxyPass = "http://10.100.0.2:5028"; proxyWebsockets = true; extraConfig = '' proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;