fixing some yazi and working on server

This commit is contained in:
Matt Nish-Lapidus 2025-04-14 12:29:32 -04:00
parent f2e2a045d8
commit 3ed1509126
6 changed files with 43 additions and 15 deletions

View file

@ -1,5 +1,7 @@
{ config, lib, pkgs, ... }:
let
port = 12345;
in
{
services = {
forgejo = {
@ -7,7 +9,7 @@
lfs.enable = true;
settings = {
server = {
HTTP_PORT = 12345;
HTTP_PORT = port;
};
service.DISABLE_REGISTRATION = true;
actions = {
@ -24,6 +26,17 @@
# mailerPasswordFile = config.age.secrets.forgejo-mailer-password.path;
};
# caddy.virtualHosts."gt.emenel.ca" = {
# serverAliases = [ "www.gt.emenel.ca" ];
# extraConfig = ''
# reverse_proxy http://localhost:${port} {
# header_down X-Real-IP {http.request.remote}
# header_down X-Forwarded-For {http.request.remote}
# }
# '';
# };
};
# gitea-actions-runner = {
# package = pkgs.forgejo-actions-runner;
# instances.default = {
@ -66,10 +79,10 @@
sops.secrets.forgejo-emenel.owner = "forgejo";
systemd.services.forgejo.preStart = let
adminCmd = "${lib.getExe pkgs.forgejo} admin user";
pwd = config.sops.secrets.forgejoemenel;
pwd = config.sops.secrets.forgejo-emenel;
user = "emenel"; # Note, Forgejo doesn't allow creation of an account named "admin"
in ''
${adminCmd} create --admin --email "root@localhost" --username ${user} --password "$(tr -d '\n' < ${pwd.path})" || true
${adminCmd} create --admin --email "matt@emenel.ca" --username ${user} --password "$(tr -d '\n' < ${pwd.path})" || true
## uncomment this line to change an admin user which was already created
# ${adminCmd} change-password --username ${user} --password "$(tr -d '\n' < ${pwd.path})" || true
'';