containers/citrine: customise homepage and disable registrations

This commit is contained in:
Cilly Leang 2026-03-16 02:04:31 +11:00
parent 2a27838974
commit d577030892
Signed by: cilly
GPG key ID: 6500251E087653C9
2 changed files with 25 additions and 1 deletions

View file

@ -3,16 +3,21 @@
networking.firewall.allowedTCPPorts = [ 3000 ];
networking.firewall.allowedUDPPorts = [ 3000 ];
systemd.tmpfiles.rules = [
"L+ /persist/forgejo/custom/templates - - - - ${./templates}"
];
services.forgejo = {
enable = true;
lfs.enable = true;
settings = {
DEFAULT.APP_NAME = "Garden";
server = {
DOMAIN = "garden.lava.moe";
ROOT_URL = "https://garden.lava.moe/";
HTTP_PORT = 3000;
};
service.DISABLE_REGISTRATION = false;
service.DISABLE_REGISTRATION = true;
};
stateDir = "/persist/forgejo";
};

View file

@ -0,0 +1,19 @@
{{template "base/head" .}}
{{if not .IsSigned}}
<script>window.location.href = "/explore/repos";</script>
{{end}}
<div role="main" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home"}}{{end}}" class="page-content home">
<div class="tw-mb-8 tw-px-8">
<div class="center">
<img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}">
<div class="hero">
<h1 class="ui icon header title">
{{AppDisplayName}}
</h1>
<h2>{{ctx.Locale.Tr "startpage.app_desc"}}</h2>
</div>
</div>
</div>
{{template "home_forgejo" .}}
</div>
{{template "base/footer" .}}