serve nexus flatpak repo

This commit is contained in:
Henry Hiles 2026-09-28 17:49:36 -04:00
commit 16f59f80f7
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
4 changed files with 45 additions and 21 deletions

View file

@ -0,0 +1,34 @@
{ pkgs, ... }: {
services.caddy.virtualHosts."nexus.federated.nexus".extraConfig = ''
handle_path /flatpak/* {
@meta path /nexus.flatpakref /nexus.flatpakrepo
handle @meta {
root * ${
pkgs.linkFarm "nexus-flatpak-meta" {
"nexus.flatpakref" = ./nexus.flatpakref;
"nexus.flatpakrepo" = ./nexus.flatpakrepo;
}
}
file_server
}
handle {
rewrite * /nexus{path}
reverse_proxy https://henry-hiles.github.io {
header_up Host {upstream_hostport}
}
}
@immutable path /objects/* /deltas/*
header @immutable >Cache-Control "public, max-age=31536000, immutable"
@mutable path /summary /summary.sig /refs/* /appstream/*
header @mutable >Cache-Control "no-cache"
}
handle {
redir https://git.federated.nexus/Nexus/nexus{uri} permanent
}
'';
}

View file

@ -0,0 +1,8 @@
[Flatpak Ref]
Title=Nexus
Name=nexus.federated.nexus
Branch=stable
Url=https://nexus.federated.nexus/flatpak/
SuggestRemoteName=nexus
IsRuntime=false
RuntimeRepo=https://dl.flathub.org/repo/flathub.flatpakrepo

View file

@ -0,0 +1,3 @@
[Flatpak Repo]
Title=Nexus
Url=https://nexus.federated.nexus/flatpak/