Use catppuccin's forgejo module
This commit is contained in:
parent
273d64c3d7
commit
a3d2c75890
3 changed files with 14 additions and 51 deletions
|
|
@ -56,6 +56,7 @@
|
||||||
systems.modules.nixos = with inputs; [
|
systems.modules.nixos = with inputs; [
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
|
catppuccin.nixosModules.catppuccin
|
||||||
];
|
];
|
||||||
|
|
||||||
homes.modules = with inputs; [ catppuccin.homeModules.catppuccin ];
|
homes.modules = with inputs; [ catppuccin.homeModules.catppuccin ];
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,8 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
catppuccin.forgejo.enable = true;
|
||||||
|
|
||||||
services.forgejo = {
|
services.forgejo = {
|
||||||
enable = true;
|
enable = true;
|
||||||
database = {
|
database = {
|
||||||
|
|
@ -55,37 +57,23 @@ in
|
||||||
service.DISABLE_REGISTRATION = true;
|
service.DISABLE_REGISTRATION = true;
|
||||||
|
|
||||||
# webhook.ALLOWED_HOST_LIST = "hydra.kilonull.com";
|
# webhook.ALLOWED_HOST_LIST = "hydra.kilonull.com";
|
||||||
|
|
||||||
ui.THEMES = ''
|
|
||||||
catppuccin-latte-rosewater,catppuccin-latte-flamingo,catppuccin-latte-pink,catppuccin-latte-mauve,catppuccin-latte-red,catppuccin-latte-maroon,catppuccin-latte-peach,catppuccin-latte-yellow,catppuccin-latte-green,catppuccin-latte-teal,catppuccin-latte-sky,catppuccin-latte-sapphire,catppuccin-latte-blue,catppuccin-latte-lavender,catppuccin-frappe-rosewater,catppuccin-frappe-flamingo,catppuccin-frappe-pink,catppuccin-frappe-mauve,catppuccin-frappe-red,catppuccin-frappe-maroon,catppuccin-frappe-peach,catppuccin-frappe-yellow,catppuccin-frappe-green,catppuccin-frappe-teal,catppuccin-frappe-sky,catppuccin-frappe-sapphire,catppuccin-frappe-blue,catppuccin-frappe-lavender,catppuccin-macchiato-rosewater,catppuccin-macchiato-flamingo,catppuccin-macchiato-pink,catppuccin-macchiato-mauve,catppuccin-macchiato-red,catppuccin-macchiato-maroon,catppuccin-macchiato-peach,catppuccin-macchiato-yellow,catppuccin-macchiato-green,catppuccin-macchiato-teal,catppuccin-macchiato-sky,catppuccin-macchiato-sapphire,catppuccin-macchiato-blue,catppuccin-macchiato-lavender,catppuccin-mocha-rosewater,catppuccin-mocha-flamingo,catppuccin-mocha-pink,catppuccin-mocha-mauve,catppuccin-mocha-red,catppuccin-mocha-maroon,catppuccin-mocha-peach,catppuccin-mocha-yellow,catppuccin-mocha-green,catppuccin-mocha-teal,catppuccin-mocha-sky,catppuccin-mocha-sapphire,catppuccin-mocha-blue,catppuccin-mocha-lavender
|
|
||||||
'';
|
|
||||||
ui.DEFAULT_THEME = "catppuccin-mocha-green";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
|
||||||
"d '${forgejo_cfg.customDir}/public' 0750 ${forgejo_cfg.user} ${forgejo_cfg.group} - -"
|
|
||||||
"z '${forgejo_cfg.customDir}/public' 0750 ${forgejo_cfg.user} ${forgejo_cfg.group} - -"
|
|
||||||
"d '${forgejo_cfg.customDir}/public/assets' 0750 ${forgejo_cfg.user} ${forgejo_cfg.group} - -"
|
|
||||||
"z '${forgejo_cfg.customDir}/public/assets' 0750 ${forgejo_cfg.user} ${forgejo_cfg.group} - -"
|
|
||||||
"L+ '${forgejo_cfg.customDir}/public/assets/css' - - - - ${pkgs.aa.catppuccin-gitea}/share/gitea-themes"
|
|
||||||
];
|
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
virtualHosts."${cfg.domain}" =
|
virtualHosts."${cfg.domain}" = {
|
||||||
{
|
locations."/" = {
|
||||||
locations."/" = {
|
proxyPass = "http://127.0.0.1:${toString forgejo_cfg.settings.server.HTTP_PORT}";
|
||||||
proxyPass = "http://127.0.0.1:${toString forgejo_cfg.settings.server.HTTP_PORT}";
|
|
||||||
};
|
|
||||||
locations."= /" = {
|
|
||||||
return = "301 /explore/repos";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
// lib.optionalAttrs (cfg.acmeCertName != "") {
|
|
||||||
forceSSL = true;
|
|
||||||
useACMEHost = cfg.acmeCertName;
|
|
||||||
};
|
};
|
||||||
|
locations."= /" = {
|
||||||
|
return = "301 /explore/repos";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// lib.optionalAttrs (cfg.acmeCertName != "") {
|
||||||
|
forceSSL = true;
|
||||||
|
useACMEHost = cfg.acmeCertName;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
{
|
|
||||||
stdenv,
|
|
||||||
fetchurl,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
pname = "catppuccin-gitea";
|
|
||||||
version = "0.4.1";
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
url = "https://github.com/catppuccin/gitea/releases/download/v0.4.1/catppuccin-gitea.tar.gz";
|
|
||||||
hash = "sha256-/P4fLvswitlfeaKaUykrEKvjbNpw5Q/nzGQ/GZaLyUI=";
|
|
||||||
};
|
|
||||||
|
|
||||||
dontBuild = true;
|
|
||||||
|
|
||||||
unpackPhase = ''
|
|
||||||
mkdir themes
|
|
||||||
tar xf "$src" --mode=+w --warning=no-timestamp -C themes
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p "$out/share/gitea-themes"
|
|
||||||
cp -r themes/*.css "$out/share/gitea-themes/"
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue