add forgejo/gitea themes, update readme
This commit is contained in:
parent
57d42ee3c1
commit
ed720cc9dc
2 changed files with 24 additions and 0 deletions
|
@ -3,6 +3,12 @@
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.services.forgejo;
|
cfg = config.modules.services.forgejo;
|
||||||
|
|
||||||
|
theme = pkgs.fetchzip {
|
||||||
|
url = "https://github.com/catppuccin/gitea/releases/download/v0.4.0/catppuccin-gitea.tar.gz";
|
||||||
|
sha256 = "15ac7nk2a7jkwf714f9c2mxq3sn53rc9xwg2izg9syffvjsxa033";
|
||||||
|
stripRoot = false;
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
options.modules.services.forgejo = {
|
options.modules.services.forgejo = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
@ -40,6 +46,15 @@ in {
|
||||||
PASSWORD_HASH_ALGO = "argon2";
|
PASSWORD_HASH_ALGO = "argon2";
|
||||||
PASSWORD_CHECK_PWN = true;
|
PASSWORD_CHECK_PWN = true;
|
||||||
};
|
};
|
||||||
|
"ui" = {
|
||||||
|
THEMES =
|
||||||
|
builtins.concatStringsSep
|
||||||
|
","
|
||||||
|
(["auto"]
|
||||||
|
++ (map (name: removePrefix "theme-" (removeSuffix ".css" name))
|
||||||
|
(attrNames (builtins.readDir theme))));
|
||||||
|
DEFAULT_THEME = "catppuccin-mocha-red";
|
||||||
|
};
|
||||||
"ui.meta" = {
|
"ui.meta" = {
|
||||||
AUTHOR = "reidlab";
|
AUTHOR = "reidlab";
|
||||||
DESCRIPTION = "reidlab's git instance";
|
DESCRIPTION = "reidlab's git instance";
|
||||||
|
@ -77,5 +92,13 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services.gitea = {
|
||||||
|
preStart = mkAfter ''
|
||||||
|
rm -rf ${config.services.gitea.stateDir}/custom/public
|
||||||
|
mkdir -p ${config.services.gitea.stateDir}/custom/public
|
||||||
|
ln -sf ${theme} ${config.services.gitea.stateDir}/custom/public/css
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ Nix Flake dotfiles used on my server.
|
||||||
## Todo
|
## Todo
|
||||||
|
|
||||||
* Make it so our secrets consist upon reboot (currently just our wifi password, have to set every reboot) (maybe with [Agenix](https://github.com/ryantm/agenix) + [Age](https://github.com/FiloSottile/age)?
|
* Make it so our secrets consist upon reboot (currently just our wifi password, have to set every reboot) (maybe with [Agenix](https://github.com/ryantm/agenix) + [Age](https://github.com/FiloSottile/age)?
|
||||||
|
* Migrate our openresty/nginx modules and our gitea themes to actual packages
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue