From 69f794e21881cd651b67622bf0ad72a33568e9b9 Mon Sep 17 00:00:00 2001 From: kat witch Date: Mon, 30 Aug 2021 03:55:30 +0100 Subject: [PATCH] services/gitea: Move to theme.park overseerr --- README.md | 11 +++--- config/services/gitea/default.nix | 38 ++++++++++++------- .../gitea/templates/custom/header.tmpl | 1 + 3 files changed, 31 insertions(+), 19 deletions(-) create mode 100644 config/services/gitea/templates/custom/header.tmpl diff --git a/README.md b/README.md index 276e4523..ee4c07cc 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@ [![nodes][]][1] -[This repository on our self hosted git.][] +[This repository on my self hosted git.][] + [This repository on GitHub.][] These are the NixOS configurations for my systems. I run nothing other than NixOS on my hardware, aside from virtual machines. @@ -23,7 +24,7 @@ These are the NixOS configurations for my systems. I run nothing other than NixO - [ ] Consider reworking [kittywitch/nixexprs][] and [kittywitch/nixfiles-base][]. - [x] In-housed [kittywitch/nixexprs][] as [exprs][]. - - [x] Merged our local changes with [exprs][]. + - [x] Merged my local changes with [exprs][]. - [ ] Prioritise modules reusability. - [ ] Expand [kittywitch/anicca][] to be a module that helps with impermanence, too. - [x] Host impermanence enablement check. @@ -32,7 +33,7 @@ These are the NixOS configurations for my systems. I run nothing other than NixO - [ ] Bind mount start/enabler script. - [ ] Move to using [arcnmx/screenstub][] without any patches. - [ ] Check new config options, port current patch to new config options. -- [ ] Add swaylock-effects to our theme module. +- [ ] Add swaylock-effects to my theme module. - [x] Patched swaylock-effects. - [x] Working with swayidle + … - [ ] Add to module. @@ -43,7 +44,7 @@ These are the NixOS configurations for my systems. I run nothing other than NixO - [ ] glauca.digital migration. - [ ] Migrate [athame][] to OCI. - [ ] Look into alternatives to Yggdrasil and move to them. -- [ ] Set up IPv6 network handling for our hosts. +- [ ] Set up IPv6 network handling for my hosts. - [x] Fix network module tf-nix integrations. - [x] Rinnosuke IPv6. - [ ] Local node IPv6 configuration. @@ -177,7 +178,7 @@ Please use `nix-shell` or [direnv/direnv][]. The shell is not compatible with [n [nodes]: https://github.com/kittywitch/nixfiles/actions/workflows/nodes.yml/badge.svg [1]: https://github.com/kittywitch/nixfiles/actions/workflows/nodes.yml - [This repository on our self hosted git.]: https://git.kittywit.ch/kat/nixfiles + [This repository on my self hosted git.]: https://git.kittywit.ch/kat/nixfiles [This repository on GitHub.]: https://github.com/kittywitch/nixfiles [To-do]: #to-do [2]: #nodes diff --git a/config/services/gitea/default.nix b/config/services/gitea/default.nix index 165fd877..8734fcfd 100644 --- a/config/services/gitea/default.nix +++ b/config/services/gitea/default.nix @@ -54,27 +54,37 @@ ENABLE_NOTIFY_MAIL = true; }; ui = { - THEMES = "pitchblack,gitea,arc-green"; - DEFAULT_THEME = "pitchblack"; + THEMES = "gitea"; + DEFAULT_THEME = "gitea"; THEME_COLOR_META_TAG = "#222222"; }; }; }; - systemd.services.gitea.serviceConfig.ExecStartPre = [ - "${pkgs.coreutils}/bin/ln -sfT ${pkgs.runCommand "gitea-public" { + systemd.services.gitea.serviceConfig.ExecStartPre = + let + themePark = pkgs.fetchFromGitHub { + owner = "GilbN"; + repo = "theme.park"; + rev = "009a7b703544955f8a29197597507d9a1ae40d63"; + sha256 = "1axqivwkmw6rq0ffwi1mm209bfkvv4lyld2hgyq2zmnl7mj3fifc"; + }; + binder = pkgs.writeText "styles.css" '' + @import url("/assets/css/gitea-base.css"); + @import url("/assets/css/overseerr.css"); + ''; + in + [ + "${pkgs.coreutils}/bin/ln -sfT ${pkgs.runCommand "gitea-public" { } '' - ${pkgs.coreutils}/bin/mkdir -p $out/{css,img} - ${pkgs.coreutils}/bin/cp ${pkgs.fetchFromGitHub { - owner = "iamdoubz"; - repo = "Gitea-Pitch-Black"; - rev = "38a10947254e46a0a3c1fb90c617d913d6fe63b9"; - sha256 = "1zpmjv0h4k9nf52yaj22zyfabhv83n79f6cj6kfm5s685b2s1348"; - }}/theme-pitchblack.css $out/css - ${pkgs.coreutils}/bin/cp -r ${./public}/* $out/ + ${pkgs.coreutils}/bin/mkdir -p $out/{css,img} + ${pkgs.coreutils}/bin/cp ${themePark}/CSS/themes/gitea/gitea-base.css $out/css + ${pkgs.coreutils}/bin/cp ${themePark}/CSS/variables/overseerr.css $out/css + ${pkgs.coreutils}/bin/cp ${binder} $out/css/styles.css + ${pkgs.coreutils}/bin/cp -r ${./public}/* $out/ ''} /var/lib/gitea/custom/public" - "${pkgs.coreutils}/bin/ln -sfT ${./templates} /var/lib/gitea/custom/templates" - ]; + "${pkgs.coreutils}/bin/ln -sfT ${./templates} /var/lib/gitea/custom/templates" + ]; services.nginx.virtualHosts."git.${config.network.dns.domain}" = { enableACME = true; diff --git a/config/services/gitea/templates/custom/header.tmpl b/config/services/gitea/templates/custom/header.tmpl new file mode 100644 index 00000000..6fe560ea --- /dev/null +++ b/config/services/gitea/templates/custom/header.tmpl @@ -0,0 +1 @@ +