add agatheme
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Vivian 2022-07-31 16:12:03 +02:00
parent 9cf1d45eb8
commit fc28592bde
3 changed files with 50 additions and 3 deletions

View file

@ -28,6 +28,15 @@
maxretry = 3;
};
system.activationScripts.gitea-theme =
let
target_dir = "${config.services.gitea.stateDir}/custom/public/css/";
in
lib.stringAfter [ "var" ] ''
mkdir -p ${target_dir}
ln -s ${pkgs.v.gitea-agatheme} "${target_dir}/theme-agatheme.css"
'';
services.gitea = {
enable = true;
domain = "git.0x76.dev";
@ -38,11 +47,32 @@
ssh.clonePort = 42;
disableRegistration = true;
cookieSecure = true;
settings = {
repository = {
"ENABLE_PUSH_CREATE_USER" = true;
"DEFAULT_PUSH_CREATE_PRIVATE" = false;
};
service = {
"DEFAULT_KEEP_EMAIL_PRIVATE" = true;
};
indexer = {
"REPO_INDEXER_ENABLED" = true;
"REPO_INDEXER_PATH" = "indexers/repos.bleve";
"UPDATE_BUFFER_LEN" = 20;
"MAX_FILE_SIZE" = 1048576;
"REPO_INDEXER_EXCLUDE" = "node_modules/**";
};
ui = {
DEFAULT_THEME = "arc-green";
USE_SERVICE_WORKER = true;
"THEMES" = "gitea,arc-green,agatheme";
"DEFAULT_THEME" = "agatheme";
"USE_SERVICE_WORKER" = true;
};
server = {
"LANDING_PAGE" = "explore";
};
session = {
"PROVIDER" = "db";
};
};
};

View file

@ -15,5 +15,7 @@ final: prev: {
withDNSCrypt = true;
withTFO = true;
};
gitea-agatheme = prev.callPackage ./gitea-agatheme { };
};
}

View file

@ -0,0 +1,15 @@
{ lib, stdenv, fetchurl }: stdenv.mkDerivation rec {
pname = "gitea-agatheme";
version = "1.1";
src = fetchurl {
url = "https://git.lain.faith/attachments/4c2c2237-1e67-458e-8acd-92a20d382777";
sha256 = "sha256-uwtg6BAR5J28Ls3naQkJg7xBEfZPXVS5INH+bsVn4Uk=";
};
phases = [ "installPhase" ];
installPhase = ''
cp $src $out
'';
}