Catpuccin theme for forgejo
This commit is contained in:
parent
d7000927a3
commit
96bca1f669
1 changed files with 39 additions and 0 deletions
|
@ -1,11 +1,35 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
theme = pkgs.fetchzip {
|
||||||
|
url = "https://github.com/catppuccin/gitea/releases/download/v1.0.1/catppuccin-gitea.tar.gz";
|
||||||
|
hash = "sha256-et5luA3SI7iOcEIQ3CVIu0+eiLs8C/8mOitYlWQa/uI=";
|
||||||
|
stripRoot = false;
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
|
systemd.services = {
|
||||||
|
forgejo = {
|
||||||
|
preStart =
|
||||||
|
let
|
||||||
|
inherit (config.services.forgejo) stateDir;
|
||||||
|
in
|
||||||
|
lib.mkAfter ''
|
||||||
|
rm -rf ${stateDir}/custom/public/assets
|
||||||
|
mkdir -p ${stateDir}/custom/public/assets
|
||||||
|
ln -sf ${theme} ${stateDir}/custom/public/assets/css
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
services.forgejo = {
|
services.forgejo = {
|
||||||
# TODO migrate to Postgres
|
# TODO migrate to Postgres
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = pkgs.forgejo;
|
||||||
settings = {
|
settings = {
|
||||||
DEFAULT = {
|
DEFAULT = {
|
||||||
RUN_MODE = "prod"; # set to prod for better logs (worse performance)
|
RUN_MODE = "prod"; # set to prod for better logs (worse performance)
|
||||||
|
@ -18,6 +42,7 @@
|
||||||
HTTP_PORT = 3002;
|
HTTP_PORT = 3002;
|
||||||
ROOT_URL = "https://git.aciceri.dev";
|
ROOT_URL = "https://git.aciceri.dev";
|
||||||
};
|
};
|
||||||
|
federation.ENABLED = true;
|
||||||
mailer = {
|
mailer = {
|
||||||
ENABLED = true;
|
ENABLED = true;
|
||||||
PROTOCOL = "smtp+starttls";
|
PROTOCOL = "smtp+starttls";
|
||||||
|
@ -29,6 +54,20 @@
|
||||||
other = {
|
other = {
|
||||||
SHOW_FOOTER_VERSION = false;
|
SHOW_FOOTER_VERSION = false;
|
||||||
};
|
};
|
||||||
|
ui = {
|
||||||
|
DEFAULT_THEME = "catppuccin-mocha-blue";
|
||||||
|
THEMES = builtins.concatStringsSep "," (
|
||||||
|
[ "auto,forgejo-auto,forgejo-dark,forgejo-light,arc-gree,gitea" ]
|
||||||
|
++ (map (name: lib.removePrefix "theme-" (lib.removeSuffix ".css" name)) (
|
||||||
|
builtins.attrNames (builtins.readDir theme)
|
||||||
|
))
|
||||||
|
);
|
||||||
|
};
|
||||||
|
"ui.meta" = {
|
||||||
|
AUTHOR = "Andrea Ciceri";
|
||||||
|
DESCRIPTION = "My personal git forge";
|
||||||
|
KEYWORDS = "git,self-hosted,forgejo,open-source,nix,nixos";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
secrets.mailer.PASSWD = config.age.secrets.autistici-password.path;
|
secrets.mailer.PASSWD = config.age.secrets.autistici-password.path;
|
||||||
dump.enable = true;
|
dump.enable = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue