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}";
};
};
};
}

View File

@ -20,6 +20,11 @@
device.path = "/dev/disk/by-uuid/2f736fba-8a0c-4fb5-8041-c849fb5e1297";
};
services.gitea = {
enable = true;
hostname = "git.neet.dev";
};
networking.hostName = "liza";
networking.interfaces.enp1s0.useDHCP = true;

View File

@ -4,7 +4,6 @@
imports =[
./hardware-configuration.nix
../../common/common.nix
../../common/server/gitlab.nix
];
# wt6nczjfvtba6pvjt2qtevwjpq4gcbz46bwjz4hboehgecyqmzqgwnqd.onion