use gitea instead of gitlab

This commit is contained in:
zuckerberg
2021-06-13 14:02:20 -04:00
parent 421f99798f
commit 365d3e3735
4 changed files with 40 additions and 1 deletions

View File

@@ -16,6 +16,7 @@
./server/nginx-stream.nix
./server/matrix.nix
./server/zerobin.nix
./server/gitea.nix
./server/privatebin/privatebin.nix
./pc/de.nix
];

34
common/server/gitea.nix Normal file
View File

@@ -0,0 +1,34 @@
{ lib, config, ... }:
let
cfg = config.services.gitea;
in {
options.services.gitea = {
hostname = lib.mkOption {
type = lib.types.str;
example = "example.com";
};
};
config = lib.mkIf cfg.enable {
services.gitea = {
domain = cfg.hostname;
ssh.enable = true;
# lfs.enable = true;
dump.enable = true;
cookieSecure = true;
disableRegistration = true;
settings = {
other = {
SHOW_FOOTER_VERSION = false;
};
};
};
services.nginx.virtualHosts.${cfg.hostname} = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:${toString cfg.httpPort}";
};
};
};
}