Working docs

This commit is contained in:
Henry Hiles 2025-07-26 23:33:54 -04:00
commit ee965d0575
No known key found for this signature in database
3 changed files with 98 additions and 24 deletions

View file

@ -1,15 +1,32 @@
{
inputs,
config,
pkgs,
...
}: let
authDomain = "auth.federated.nexus";
domain = "docs.federated.nexus";
socket = "/run/lasuite-docs/socket";
s3Domain = "http://127.0.0.1${config.services.minio.listenAddress}";
s3Url = "${s3Domain}/lasuite-docs";
in {
services = {
imports = [inputs.lasuite-docs-proxy.nixosModules.default];
services = let
proxySocket = "/var/run/lasuite-docs-proxy/socket";
authDomain = "auth.federated.nexus";
domain = "docs.federated.nexus";
s3Url = "${s3Domain}/lasuite-docs";
socket = "/run/lasuite-docs/socket";
in {
lasuite-docs-proxy = {
enable = true;
args = [
"--socket"
proxySocket
"--authUri"
"https://docs.federated.nexus/api/v1.0/documents/media-auth/"
"--minioUri"
s3Url
];
group = "caddy";
};
lasuite-docs = {
enable = true;
enableNginx = false;
@ -67,11 +84,9 @@ in {
reverse_proxy /collaboration/ws/* http://localhost:${toString cfg.collaborationServer.port}
reverse_proxy /collaboration/api/* http://localhost:${toString cfg.collaborationServer.port}
rewrite /media-auth /api/v1.0/documents/media-auth/
reverse_proxy /api/v1.0/documents/media-auth/ unix/${socket}
rewrite /media/* /lasuite-docs
reverse_proxy /lasuite-docs ${s3Domain}
reverse_proxy /media/* unix/${proxySocket}
'';
};

87
flake.lock generated
View file

@ -820,6 +820,24 @@
}
},
"flake-parts_4": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_3"
},
"locked": {
"lastModified": 1749398372,
"narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_5": {
"inputs": {
"nixpkgs-lib": [
"sdm845",
@ -840,7 +858,7 @@
"type": "github"
}
},
"flake-parts_5": {
"flake-parts_6": {
"inputs": {
"nixpkgs-lib": [
"stylix",
@ -1195,11 +1213,11 @@
]
},
"locked": {
"lastModified": 1753470191,
"narHash": "sha256-hOUWU5L62G9sm8NxdiLWlLIJZz9H52VuFiDllHdwmVA=",
"lastModified": 1753567913,
"narHash": "sha256-eYrqSRI1/mrnVGCGYO+zkKHUszwJQodq/qDHh+mzvkI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "a1817d1c0e5eabe7dfdfe4caa46c94d9d8f3fdb6",
"rev": "2b73c2fcca690b6eca4f520179e54ae760f25d4e",
"type": "github"
},
"original": {
@ -1370,6 +1388,27 @@
"type": "github"
}
},
"lasuite-docs-proxy": {
"inputs": {
"flake-parts": "flake-parts_3",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1753585611,
"narHash": "sha256-WDo5k9/764x/nL8f5vUwaYWspQHNwbJ91euqyYKftCw=",
"ref": "refs/heads/main",
"rev": "c00582c750c98049e65d9a9ab32d03b92e67b54c",
"revCount": 7,
"type": "git",
"url": "https://git.federated.nexus/Henry-Hiles/lasuite_docs_proxy"
},
"original": {
"type": "git",
"url": "https://git.federated.nexus/Henry-Hiles/lasuite_docs_proxy"
}
},
"linyinfeng": {
"inputs": {
"devshell": [
@ -1421,7 +1460,7 @@
},
"matrixoidc": {
"inputs": {
"flake-parts": "flake-parts_3",
"flake-parts": "flake-parts_4",
"nixpkgs": [
"nixpkgs"
]
@ -2178,6 +2217,21 @@
"type": "github"
}
},
"nixpkgs-lib_3": {
"locked": {
"lastModified": 1748740939,
"narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "656a64127e9d791a334452c6b6606d17539476e2",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs-riscv": {
"locked": {
"lastModified": 1752147015,
@ -2505,11 +2559,11 @@
"utils": "utils"
},
"locked": {
"lastModified": 1753515282,
"narHash": "sha256-vSihpZor6HFdbUU0pX8MTB1ZLM+XFmhDsFF7S35iIT8=",
"lastModified": 1753565274,
"narHash": "sha256-UPDrQgcQOfXzlFDbWQyVxlvlLMH6epsw6ayB6NP/IhE=",
"owner": "wamserma",
"repo": "flake-programs-sqlite",
"rev": "e2a9f0bb925432018eb1d4bbbd40b1377e42422c",
"rev": "db71137c3b9a2de48a22225a2955215e11fd1e3b",
"type": "github"
},
"original": {
@ -2545,6 +2599,7 @@
"gnome-mobile": "gnome-mobile",
"grapevine": "grapevine",
"home-manager": "home-manager_2",
"lasuite-docs-proxy": "lasuite-docs-proxy",
"matrixoidc": "matrixoidc",
"nix-matrix-appservices": "nix-matrix-appservices",
"nixpkgs": "nixpkgs_2",
@ -2567,11 +2622,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1751349062,
"narHash": "sha256-wLopPCwevrrcglUAQLt5+NEc/IPkJ34JK73KaN4LDs4=",
"lastModified": 1753540696,
"narHash": "sha256-qNQt+nTE4S1t7pwcR3/alfUTYFEbvDPIyvdlXxtXvwQ=",
"owner": "lordgrimmauld",
"repo": "run0-sudo-shim",
"rev": "0fd6700cbfeb10016ef9f41097bcc99c813ce7b6",
"rev": "8e765307e1c4251cf2802cb032ce451384685057",
"type": "github"
},
"original": {
@ -2672,7 +2727,7 @@
"emacs-overlay": "emacs-overlay",
"fenix": "fenix_2",
"flake-compat": "flake-compat_5",
"flake-parts": "flake-parts_4",
"flake-parts": "flake-parts_5",
"flake-schemas": "flake-schemas",
"flake-utils": "flake-utils_4",
"flake-utils-plus": "flake-utils-plus",
@ -2767,7 +2822,7 @@
"base16-helix": "base16-helix",
"base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme_2",
"flake-parts": "flake-parts_5",
"flake-parts": "flake-parts_6",
"gnome-shell": "gnome-shell",
"nixpkgs": [
"nixpkgs"
@ -2781,11 +2836,11 @@
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1753490930,
"narHash": "sha256-noQ6sJ1twQvvGH34d13iM0uh95Syx+kb3nw45wTalIM=",
"lastModified": 1753553562,
"narHash": "sha256-CpTwdsrPU3UFy95Btg56RcVMgNpnw3C0DYTznE5aRq4=",
"owner": "danth",
"repo": "stylix",
"rev": "744431e17676177c18c4c52e8781ba6e91db30d6",
"rev": "af85565aba0f4749cb18b118a7333a0745920950",
"type": "github"
},
"original": {

View file

@ -28,6 +28,10 @@
url = "git+https://git.federated.nexus/Henry-Hiles/matrixoidc";
inputs.nixpkgs.follows = "nixpkgs";
};
lasuite-docs-proxy = {
url = "git+https://git.federated.nexus/Henry-Hiles/lasuite_docs_proxy";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-matrix-appservices = {
url = "gitlab:coffeetables/nix-matrix-appservices";
inputs.nixpkgs.follows = "nixpkgs";