use gitea instead of gitlab
This commit is contained in:
@@ -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
34
common/server/gitea.nix
Normal 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}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user