Commit 7bb042c
committed
feat(forge): add mios-forge Quadlet -- self-hosted Git forge (Forgejo)
WHY FORGEJO (over GitLab CE / Gitea / OneDev / cgit)
Per the architectural analysis recorded in CREDITS.md (\xa711 row +
research-project preamble), Forgejo is the only forge that fits MiOS-
BUILDER's WSL2-resident resource budget without crowding out 'podman
build' of the MiOS image itself:
Idle footprint: 150-300 MB RAM, single core sufficient for small
teams; SQLite default removes the PostgreSQL +
Redis sidecar overhead GitLab CE would require.
Governance: GPLv3+ under Codeberg e.V. (German non-profit) --
aligns with MiOS's research-project / generative
framing in AGREEMENTS.md.
CI compatibility: Forgejo Runner consumes GitHub-Actions YAML, so
.github/workflows/mios-ci.yml runs unmodified once
pointed at mios-forge instead of github.com.
Federation: ActivityPub / ForgeFed already implemented; future
cross-instance collaboration without surrendering
source-code custody.
Architectural-law fit:
- Law 1 USR-OVER-ETC: vendor template under
/etc/mios/forge (admin-override surface; same
pattern as /etc/nvidia-container-toolkit/).
- Law 2 NO-MKDIR-IN-VAR: every /var/ + /srv/ path
declared via usr/lib/tmpfiles.d/mios-forge.conf.
- Law 3 BOUND-IMAGES: covered by the existing
automation/08-system-files-overlay.sh:74-86
binder loop -- mios-forge.container symlinks
into /usr/lib/bootc/bound-images.d/ at build.
- Law 5 UNIFIED-AI-REDIRECTS: Forgejo has no
built-in AI surface, so no vendor URL leaks
(postcheck #12 passes without exemption).
- Law 6 UNPRIVILEGED-QUADLETS: User=mios-forge,
Group=mios-forge, Delegate=yes (no root
exception needed -- contrast with GitLab CE
omnibus which requires uid 0).
FILES ADDED
etc/containers/systemd/mios-forge.container
Quadlet for codeberg.org/forgejo/forgejo:11. HTTP
on :3000, git+ssh on :2222 (avoiding sshd:22),
SQLite default, registration disabled,
INSTALL_LOCK=true so the first hit goes straight
to login. ConditionPathIsDirectory + !container
gating consistent with mios-ai.container.
usr/lib/tmpfiles.d/mios-forge.conf
Declares /srv/mios/forge, /var/lib/mios/forge,
/var/log/mios/forge, /etc/mios/forge with
mios-forge ownership. /srv chosen per FHS-3.0
'data served by the system'.
FILES UPDATED
usr/lib/sysusers.d/50-mios-services.conf
Appended 'g mios-forge 816' + 'u mios-forge
816:mios-forge ...' (next free slot in the 810-
829 reservation; nologin shell so postcheck #8
cannot trip).
usr/share/mios/env.defaults
MIOS_FORGE_VERSION=11, MIOS_FORGE_IMAGE,
MIOS_FORGE_HTTP_PORT=3000, MIOS_FORGE_SSH_PORT=2222.
usr/share/mios/mios.toml + mios-bootstrap/mios.toml
[quadlets.enable] mios-forge = true (defaults
policy: every flag is true; ConditionVirtualization
handles the runtime gating).
CREDITS.md \xa711 + \xa722
Forgejo, Forgejo Runner, ActivityPub/ForgeFed
listed in storage/cluster table; mios-forge.container
listed in MiOS-internal runtime-surface table.
AGREEMENTS.md \xa74
Entry-points table: 'git push http://localhost:3000/
<user>/<repo>' added as the canonical 'locally
hosted .git = ./' acknowledgment surface.
POSTCHECK COVERAGE (all four invariant lints stay green)
#11 tmpfiles --dry-run: mios-forge user is sysusers-declared, so the
false-positive filter accepts it.
#12 UNIFIED-AI-REDIRECTS: zero vendor URLs in the new files.
#13 UNPRIVILEGED-QUADLETS: User=mios-forge present; no exception added.
#14 BOUND-IMAGES: binder loop covers etc/containers/systemd/*.container
automatically.
OPERATOR USAGE
After 'just build' picks up the new Quadlet and the host boots:
# First-run admin user creation (via web UI at http://localhost:3000)
# then locally:
git remote add origin http://localhost:3000/<user>/<repo>.git
git push origin main
# OR over SSH:
git remote add origin ssh://git@localhost:2222/<user>/<repo>.git
Repository bytes live at /srv/mios/forge/git on the host vhdx; the
SQLite DB at /srv/mios/forge/forgejo.db. Both are inside the WSL2
builder's persistent storage and survive 'just build' rebuilds.1 parent d58ed24 commit 7bb042c
7 files changed
Lines changed: 109 additions & 1 deletion
File tree
- etc/containers/systemd
- usr
- lib
- sysusers.d
- tmpfiles.d
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
212 | 215 | | |
213 | 216 | | |
214 | 217 | | |
| |||
415 | 418 | | |
416 | 419 | | |
417 | 420 | | |
| 421 | + | |
418 | 422 | | |
419 | 423 | | |
420 | 424 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
| |||
0 commit comments