feat: forgejo init

This commit is contained in:
s-prechtl 2026-03-23 21:56:53 +01:00
parent 29f68a899d
commit bd327cef20
7 changed files with 130 additions and 63 deletions

View file

@ -121,6 +121,10 @@
anki
banana-cursor
bat
bitwarden-desktop
bitwarden-menu
rbw
rofi-rbw
blueman
brave
brightnessctl
@ -198,7 +202,7 @@
sqlc
teams-for-linux
teamspeak6-client
texliveFull
#texliveFull
thunderbird
tldr
tmuxinator
@ -364,5 +368,5 @@
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "25.11"; # Did you read the comment?
system.stateVersion = "26.05"; # Did you read the comment?
}

View file

@ -10,7 +10,7 @@
../../modules/home-manager/dunst.nix
../../modules/home-manager/fastfetch.nix
../../modules/home-manager/git.nix
../../modules/home-manager/helix.nix
# ../../modules/home-manager/helix.nix
../../modules/home-manager/hyprland.nix
../../modules/home-manager/nextcloud.nix
../../modules/home-manager/pass.nix
@ -31,7 +31,7 @@
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "24.05"; # Please read the comment before changing.
home.stateVersion = "26.05"; # Please read the comment before changing.
nixpkgs.config.allowUnfree = true;
home.packages = with pkgs; [
zsh-autosuggestions

View file

@ -0,0 +1,58 @@
{ lib, pkgs, config, ... }:
let
cfg = config.services.forgejo;
srv = cfg.settings.server;
mail = "tague.at";
in
{
services.nginx = {
virtualHosts.${cfg.settings.server.DOMAIN} = {
forceSSL = true;
enableACME = true;
extraConfig = ''
client_max_body_size 512M;
'';
locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}";
};
};
services.forgejo = {
enable = true;
database.type = "postgres";
# Enable support for Git Large File Storage
lfs.enable = true;
settings = {
server = {
DOMAIN = "git.sprechtl.me";
# You need to specify this to remove the port from URLs in the web UI.
ROOT_URL = "https://${srv.DOMAIN}/";
HTTP_PORT = 3000;
};
# You can temporarily allow registration to create an admin user.
service.DISABLE_REGISTRATION = true;
# Add support for actions, based on act: https://github.com/nektos/act
actions = {
ENABLED = true;
DEFAULT_ACTIONS_URL = "github";
};
# Sending emails is completely optional
# You can send a test email from the web UI at:
# Profile Picture > Site Administration > Configuration > Mailer Configuration
mailer = {
ENABLED = true;
SMTP_ADDR = mail;
FROM = "forgejo@${mail}";
USER = "stefan@${mail}";
};
};
secrets = {
mailer.PASSWD = config.age.secrets.forgejo-mailer-password.path;
};
};
age.secrets.forgejo-mailer-password = {
file = ../secrets/forgejo-mailer-password.age;
mode = "400";
owner = "forgejo";
};
}