mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-23 11:29:06 +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";
|
wireguardIp = "192.168.83.4";
|
||||||
};
|
};
|
||||||
hpcstat = {};
|
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" ];
|
user.users = [ "chn" "xll" "zem" "yjq" "gb" ];
|
||||||
};
|
};
|
||||||
|
@ -54,7 +54,7 @@ inputs:
|
|||||||
fz-new-order = {};
|
fz-new-order = {};
|
||||||
nginx.applications = { kkmeeting.enable = true; webdav.instances."webdav.chn.moe" = {}; };
|
nginx.applications = { kkmeeting.enable = true; webdav.instances."webdav.chn.moe" = {}; };
|
||||||
httpapi.enable = true;
|
httpapi.enable = true;
|
||||||
gitea.enable = true;
|
gitea = { enable = true; ssh = {}; };
|
||||||
grafana.enable = true;
|
grafana.enable = true;
|
||||||
fail2ban = {};
|
fail2ban = {};
|
||||||
wireguard =
|
wireguard =
|
||||||
|
@ -4,6 +4,15 @@ inputs:
|
|||||||
{
|
{
|
||||||
enable = mkOption { type = types.bool; default = false; };
|
enable = mkOption { type = types.bool; default = false; };
|
||||||
hostname = mkOption { type = types.str; default = "git.chn.moe"; };
|
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
|
config = let inherit (inputs.config.nixos.services) gitea; in inputs.lib.mkIf gitea.enable
|
||||||
{
|
{
|
||||||
@ -27,7 +36,8 @@ inputs:
|
|||||||
ROOT_URL = "https://${gitea.hostname}";
|
ROOT_URL = "https://${gitea.hostname}";
|
||||||
DOMAIN = gitea.hostname;
|
DOMAIN = gitea.hostname;
|
||||||
HTTP_PORT = 3002;
|
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 =
|
mailer =
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user