diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6b6fd46 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "nix.formatterPath": "alejandra" +} \ No newline at end of file diff --git a/config/services/containers.nix b/config/services/containers.nix index e18b0b5..96b81c3 100644 --- a/config/services/containers.nix +++ b/config/services/containers.nix @@ -25,17 +25,6 @@ in { extraOptions = ["--pull=always"]; }; - pepperjack = { - image = "ghcr.io/phasecorex/red-discordbot:core-audio"; - environment = { - PREFIX = "~"; - OWNER = "505490445468696576"; - }; - environmentFiles = [config.age.secrets."containers/pepperjack.env".path]; - volumes = ["/srv/data-pepperjack:/data"]; - extraOptions = ["--pull=always"]; - }; - website = { image = "ghcr.io/nekowinston/winston.sh/winston-sh:latest"; login = ghcrLogin; diff --git a/config/services/gitea.nix b/config/services/gitea.nix index 4fc01cc..d0aa000 100644 --- a/config/services/gitea.nix +++ b/config/services/gitea.nix @@ -3,13 +3,7 @@ lib, pkgs, ... -}: let - theme = pkgs.fetchzip { - url = "https://github.com/catppuccin/gitea/releases/download/v0.4.1/catppuccin-gitea.tar.gz"; - sha256 = "sha256-14XqO1ZhhPS7VDBSzqW55kh6n5cFZGZmvRCtMEh8JPI="; - stripRoot = false; - }; -in { +}: { services.gitea = { enable = true; @@ -22,7 +16,7 @@ in { lfs.enable = true; - appName = "nekowinston's Gitea"; + appName = "winston's gitea"; settings = { actions.ENABLED = true; @@ -55,30 +49,30 @@ in { SAME_SITE = "strict"; }; - ui = { - THEMES = - builtins.concatStringsSep - "," - (["auto"] - ++ (map (name: lib.removePrefix "theme-" (lib.removeSuffix ".css" name)) - (builtins.attrNames (builtins.readDir theme)))); - DEFAULT_THEME = "catppuccin-frappe-pink"; + "ui.meta" = { + AUTHOR = "nekowinston"; + DESCRIPTION = "winston's gitea instance"; + }; + + other = { + SHOW_FOOTER_VERSION = false; + SHOW_FOOTER_TEMPLATE_LOAD_TIME = false; + SHOW_FOOTER_BRANDING = false; }; }; }; - networking.firewall.allowedTCPPorts = [22]; + systemd.services.gitea.preStart = let + inherit (config.services.gitea) stateDir; + in + lib.mkAfter '' + chmod u+w -R ${stateDir}/custom/**/* + # apply customizations + cp -Rf ${./gitea}/* ${stateDir}/custom + chmod u-w -R ${stateDir}/custom/**/* + ''; - systemd.services.gitea = { - preStart = let - inherit (config.services.gitea) stateDir; - in - lib.mkAfter '' - rm -rf ${stateDir}/custom/public/assets - mkdir -p ${stateDir}/custom/public/assets - ln -sf ${theme} ${stateDir}/custom/public/assets/css - ''; - }; + networking.firewall.allowedTCPPorts = [22]; age.secrets."services/gitea/password-database".owner = "gitea"; diff --git a/config/services/gitea/templates/custom/extra_links_footer.tmpl b/config/services/gitea/templates/custom/extra_links_footer.tmpl new file mode 100644 index 0000000..5567455 --- /dev/null +++ b/config/services/gitea/templates/custom/extra_links_footer.tmpl @@ -0,0 +1,4 @@ + + + GitHub + diff --git a/config/services/gitea/templates/custom/header.tmpl b/config/services/gitea/templates/custom/header.tmpl new file mode 100644 index 0000000..78cb48e --- /dev/null +++ b/config/services/gitea/templates/custom/header.tmpl @@ -0,0 +1,11 @@ + + + + \ No newline at end of file diff --git a/config/services/gitea/templates/home.tmpl b/config/services/gitea/templates/home.tmpl new file mode 100644 index 0000000..be23567 --- /dev/null +++ b/config/services/gitea/templates/home.tmpl @@ -0,0 +1,17 @@ +{{template "base/head" .}} +