From 5d9730428a3a32aeca569e9759f7af1c1062d6ef Mon Sep 17 00:00:00 2001 From: zoey Date: Thu, 29 May 2025 13:14:40 -0400 Subject: [PATCH] updates --- .github/workflows/daily-flake-update.yml | 4 ++++ modules/nixos/sites/code/default.nix | 24 ++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/daily-flake-update.yml b/.github/workflows/daily-flake-update.yml index 16af9b0..4286378 100644 --- a/.github/workflows/daily-flake-update.yml +++ b/.github/workflows/daily-flake-update.yml @@ -33,6 +33,10 @@ jobs: experimental-features = nix-command flakes access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + - name: Install Dependencies + id: deps + run: apt update && apt install jq + - name: Check for existing PR id: check-pr run: | diff --git a/modules/nixos/sites/code/default.nix b/modules/nixos/sites/code/default.nix index 57cd0b3..4af0c2f 100644 --- a/modules/nixos/sites/code/default.nix +++ b/modules/nixos/sites/code/default.nix @@ -10,6 +10,12 @@ with lib.custom; let cfg = config.sites.forgejo; frg = config.services.forgejo; 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 { options.sites.forgejo = with types; { enable = mkBoolOpt false "Enable Forgejo site"; @@ -27,7 +33,7 @@ in { locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}"; }; - catppuccin.forgejo.enable = true; + catppuccin.forgejo.enable = false; services.gitea-actions-runner = { package = pkgs.forgejo-actions-runner; @@ -60,6 +66,15 @@ in { ROOT_URL = "https://${srv.DOMAIN}"; 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; actions = { ENABLED = true; @@ -84,7 +99,12 @@ in { pwd = config.age.secrets.forgejo-pw; user = "zoey"; 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 = { forgejo-mailer-password = {