machines/magenta: try to fix gpg in gitea #9

Merged
pleshevskiy merged 1 commit from gitea-new into main 2022-10-19 00:12:34 +03:00
Showing only changes of commit 9d51191434 - Show all commits

View file

@ -1,6 +1,19 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let hostname = "nix-git.pleshevski.ru"; in let
hostname = "nix-git.pleshevski.ru";
gitea = pkgs.gitea.overrideAttrs (oldAttrs: {
postInstall = with pkgs; ''
mkdir $data
cp -R ./go/src/${oldAttrs.goPackagePath}/{public,templates,options} $data
mkdir -p $out
cp -R ./go/src/${oldAttrs.goPackagePath}/options/locale $out/locale
wrapProgram $out/bin/gitea \
--prefix PATH : ${lib.makeBinPath [ bash git gzip openssh gnupg ]}
'';
});
in
{ {
services.postgresql.package = pkgs.postgresql_14; services.postgresql.package = pkgs.postgresql_14;
@ -10,20 +23,11 @@ let hostname = "nix-git.pleshevski.ru"; in
user = { user = {
email = "gitea@noreply.pleshevski.ru"; email = "gitea@noreply.pleshevski.ru";
name = "Gitea"; name = "Gitea";
signingKey = "7B1C00B534537C0E"; signingKey = "745324BD4A15B11F5725B8E6A29AAC22198EF078";
}; };
gpg.program = "/run/current-system/sw/bin/gpg"; gpg.program = "${pkgs.gnupg}/bin/gpg";
commit.gpgSign = true; commit.gpgSign = true;
tag.gpgSign = true; tag.gpgSign = true;
core = {
quotePath = false;
commitGraph = true;
};
receive = {
advertisePushOptions = true;
procReceiveRefs = "refs/for";
};
gc.writeCommitGraph = true;
}; };
}; };
@ -31,6 +35,7 @@ let hostname = "nix-git.pleshevski.ru"; in
services.gitea = { services.gitea = {
enable = true; enable = true;
package = gitea;
httpPort = 9901; httpPort = 9901;
domain = hostname; domain = hostname;
rootUrl = "https://${hostname}"; rootUrl = "https://${hostname}";
@ -74,10 +79,9 @@ let hostname = "nix-git.pleshevski.ru"; in
DEFAULT_CLOSE_ISSUES_VIA_COMMITS_IN_ANY_BRANCH = true; DEFAULT_CLOSE_ISSUES_VIA_COMMITS_IN_ANY_BRANCH = true;
}; };
"repository.signing" = { "repository.signing" = {
#SIGNING_EMAIL = "gitea@noreply.pleshevski.ru"; SIGNING_EMAIL = "gitea@noreply.pleshevski.ru";
#SIGNING_NAME = "Gitea"; SIGNING_NAME = "Gitea";
#SIGNING_KEY = "E1DDBF5A1406BB987779A85F55B75599806CD426"; SIGNING_KEY = "745324BD4A15B11F5725B8E6A29AAC22198EF078";
SIGNING_KEY = "default";
DEFAULT_TRUST_MODEL = "collaboratorcommiter"; DEFAULT_TRUST_MODEL = "collaboratorcommiter";
MERGES = "pubkey,basesigned,commitssigned"; MERGES = "pubkey,basesigned,commitssigned";
}; };