chore: adds sample code for when i finally add ci/cd

This commit is contained in:
Ahwx 2025-04-24 15:02:32 +02:00
parent 601954e47e
commit 4d84ef14b6

View file

@ -1,4 +1,9 @@
{ lib, pkgs, config, ... }:
{
lib,
pkgs,
config,
...
}:
let
cfg = config.services.forgejo;
srv = cfg.settings.server;
@ -13,11 +18,11 @@ in
server = {
DOMAIN = "code.liv.town";
# You need to specify this to remove the port from URLs in the web UI.
ROOT_URL = "https://${srv.DOMAIN}/";
ROOT_URL = "https://${srv.DOMAIN}/";
HTTP_PORT = 3050;
};
# You can temporarily allow registration to create an admin user.
service.DISABLE_REGISTRATION = true;
service.DISABLE_REGISTRATION = true;
# Add support for actions, based on act: https://github.com/nektos/act
actions = {
ENABLED = true;
@ -25,7 +30,7 @@ in
};
# Sending emails is completely optional
# You can send a test email from the web UI at:
# Profile Picture > Site Administration > Configuration > Mailer Configuration
# Profile Picture > Site Administration > Configuration > Mailer Configuration
# mailer = {
# ENABLED = true;
# SMTP_ADDR = "mail.example.com";
@ -35,6 +40,19 @@ in
};
# mailerPasswordFile = config.age.secrets.forgejo-mailer-password.path;
};
# gitea-actions-runner = {
# package = pkgs.forgejo-runner;
# instances.my-forgejo-instance = {
# enable = true;
# name = "forgejo-01";
# token = ""; # TODO: fill in tokens etc
# url = "https://code.liv.town";
# labels = [
# "node-22:docker://node:22-bookworm"
# "nixos-latest:docker://nixos/nix"
# ];
# };
# };
services = {
nginx.virtualHosts."code.liv.town" = {
forceSSL = true;
@ -46,10 +64,10 @@ in
};
};
};
# systemd.services.forgejo.preStart = let
# adminCmd = "${lib.getExe cfg.package} admin user";
# user = "liv";
# in ''
# ${adminCmd} create --admin --email "liv@liv.town" --username ${user} --password "boopbeepboop123123123" || true
# '';
# systemd.services.forgejo.preStart = let
# adminCmd = "${lib.getExe cfg.package} admin user";
# user = "liv";
# in ''
# ${adminCmd} create --admin --email "liv@liv.town" --username ${user} --password "boopbeepboop123123123" || true
# '';
}