mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-23 05:18:44 +08:00
services.gitea: add ssh configuration
This commit is contained in:
parent
0dfb95d722
commit
6066245021
@ -73,7 +73,7 @@ inputs:
|
||||
wireguardIp = "192.168.83.4";
|
||||
};
|
||||
hpcstat = {};
|
||||
gitea = { enable = true; hostname = "git.nas.chn.moe"; };
|
||||
gitea = { enable = true; hostname = "git.nas.chn.moe"; ssh = { hostname = "office.chn.moe"; port = 5440; }; };
|
||||
};
|
||||
user.users = [ "chn" "xll" "zem" "yjq" "gb" ];
|
||||
};
|
||||
|
@ -54,7 +54,7 @@ inputs:
|
||||
fz-new-order = {};
|
||||
nginx.applications = { kkmeeting.enable = true; webdav.instances."webdav.chn.moe" = {}; };
|
||||
httpapi.enable = true;
|
||||
gitea.enable = true;
|
||||
gitea = { enable = true; ssh = {}; };
|
||||
grafana.enable = true;
|
||||
fail2ban = {};
|
||||
wireguard =
|
||||
|
@ -4,6 +4,15 @@ inputs:
|
||||
{
|
||||
enable = mkOption { type = types.bool; default = false; };
|
||||
hostname = mkOption { type = types.str; default = "git.chn.moe"; };
|
||||
ssh = mkOption
|
||||
{
|
||||
type = types.nullOr (types.submodule { options =
|
||||
{
|
||||
hostname = mkOption { type = types.str; default = "ssh.${inputs.config.nixos.services.gitea.hostname}"; };
|
||||
port = mkOption { type = types.nullOr types.ints.unsigned; default = null; };
|
||||
};});
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
config = let inherit (inputs.config.nixos.services) gitea; in inputs.lib.mkIf gitea.enable
|
||||
{
|
||||
@ -27,7 +36,8 @@ inputs:
|
||||
ROOT_URL = "https://${gitea.hostname}";
|
||||
DOMAIN = gitea.hostname;
|
||||
HTTP_PORT = 3002;
|
||||
SSH_DOMAIN = "ssh.${gitea.hostname}";
|
||||
SSH_DOMAIN = inputs.lib.mkIf (gitea.ssh != null) gitea.ssh.hostname;
|
||||
SSH_PORT = inputs.lib.mkIf ((gitea.ssh.port or null) != null) gitea.ssh.port;
|
||||
};
|
||||
mailer =
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user