This commit is contained in:
zoey 2025-05-29 13:14:40 -04:00
parent 10e9ffb925
commit 5d9730428a
Signed by: zoey
GPG key ID: 81FB9FECDD6A33E2
2 changed files with 26 additions and 2 deletions

View file

@ -33,6 +33,10 @@ jobs:
experimental-features = nix-command flakes experimental-features = nix-command flakes
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Install Dependencies
id: deps
run: apt update && apt install jq
- name: Check for existing PR - name: Check for existing PR
id: check-pr id: check-pr
run: | run: |

View file

@ -10,6 +10,12 @@ with lib.custom; let
cfg = config.sites.forgejo; cfg = config.sites.forgejo;
frg = config.services.forgejo; frg = config.services.forgejo;
srv = frg.settings.server; srv = frg.settings.server;
theme = pkgs.fetchzip {
url = "https://github.com/catppuccin/gitea/releases/download/v1.0.2/catppuccin-gitea.tar.gz";
sha256 = "sha256-rZHLORwLUfIFcB6K9yhrzr+UwdPNQVSadsw6rg8Q7gs=";
stripRoot = false;
};
in { in {
options.sites.forgejo = with types; { options.sites.forgejo = with types; {
enable = mkBoolOpt false "Enable Forgejo site"; enable = mkBoolOpt false "Enable Forgejo site";
@ -27,7 +33,7 @@ in {
locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}"; locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}";
}; };
catppuccin.forgejo.enable = true; catppuccin.forgejo.enable = false;
services.gitea-actions-runner = { services.gitea-actions-runner = {
package = pkgs.forgejo-actions-runner; package = pkgs.forgejo-actions-runner;
@ -60,6 +66,15 @@ in {
ROOT_URL = "https://${srv.DOMAIN}"; ROOT_URL = "https://${srv.DOMAIN}";
HTTP_PORT = 7201; HTTP_PORT = 7201;
}; };
ui = {
THEMES =
builtins.concatStringsSep
","
(["auto"]
++ (map (name: lib.removePrefix "theme-" (lib.removeSuffix ".css" name))
(builtins.attrNames (builtins.readDir theme))));
DEFAULT_THEME = "catppuccin-mocha-blue";
};
service.DISABLE_REGISTRATION = true; service.DISABLE_REGISTRATION = true;
actions = { actions = {
ENABLED = true; ENABLED = true;
@ -84,7 +99,12 @@ in {
pwd = config.age.secrets.forgejo-pw; pwd = config.age.secrets.forgejo-pw;
user = "zoey"; user = "zoey";
in '' in ''
${adminCmd} create --admin --email "hi@zoeys.computer" --username ${user} --password "$(tr -d '\n' < ${pwd.path})" || true''; ${adminCmd} create --admin --email "hi@zoeys.computer" --username ${user} --password "$(tr -d '\n' < ${pwd.path})" || true
rm -rf ${config.services.forgejo.stateDir}/custom/public/assets
mkdir -p ${config.services.forgejo.stateDir}/custom/public/assets
ln -sf ${theme} ${config.services.forgejo.stateDir}/custom/public/assets/css
'';
age.secrets = { age.secrets = {
forgejo-mailer-password = { forgejo-mailer-password = {