services.gitlab: change hostname, enable ssh and lfs

This commit is contained in:
陈浩南 2023-12-16 21:15:31 +08:00
parent 2462e85b70
commit ca7668cbd5
2 changed files with 12 additions and 3 deletions

View File

@ -249,7 +249,7 @@
[ "nix-store" "xn--qbtm095lrg0bfka60z" ])) [ "nix-store" "xn--qbtm095lrg0bfka60z" ]))
// (builtins.listToAttrs (builtins.map // (builtins.listToAttrs (builtins.map
(site: { name = "${site}.chn.moe"; value.upstream.address = "wireguard.vps7.chn.moe"; }) (site: { name = "${site}.chn.moe"; value.upstream.address = "wireguard.vps7.chn.moe"; })
[ "xn--s8w913fdga" "misskey" "synapse" "send" "kkmeeting" "api" "gitlab" "grafana" ])); [ "xn--s8w913fdga" "misskey" "synapse" "send" "kkmeeting" "api" "git" "grafana" ]));
applications = applications =
{ {
element.instances."element.chn.moe" = {}; element.instances."element.chn.moe" = {};

View File

@ -3,7 +3,7 @@ inputs:
options.nixos.services.gitlab = let inherit (inputs.lib) mkOption types; in options.nixos.services.gitlab = let inherit (inputs.lib) mkOption types; in
{ {
enable = mkOption { type = types.bool; default = false; }; enable = mkOption { type = types.bool; default = false; };
hostname = mkOption { type = types.str; default = "gitlab.chn.moe"; }; hostname = mkOption { type = types.str; default = "git.chn.moe"; };
}; };
config = config =
let let
@ -29,7 +29,11 @@ inputs:
domain = gitlab.hostname; domain = gitlab.hostname;
authentication = "login"; authentication = "login";
}; };
extraConfig.gitlab.email_from = "bot@chn.moe"; extraConfig =
{
gitlab.email_from = "bot@chn.moe";
lfs.enabled = true;
};
secrets = secrets =
{ {
secretFile = inputs.config.sops.secrets."gitlab/secret".path; secretFile = inputs.config.sops.secrets."gitlab/secret".path;
@ -41,6 +45,11 @@ inputs:
initialRootEmail = "bot@chn.moe"; initialRootEmail = "bot@chn.moe";
databasePasswordFile = inputs.config.sops.secrets."gitlab/db".path; databasePasswordFile = inputs.config.sops.secrets."gitlab/db".path;
databaseHost = "127.0.0.1"; databaseHost = "127.0.0.1";
extraGitlabRb =
''
gitlab_sshd['enable'] = true
gitlab_sshd['listen_address'] = '0.0.0.0:2222'
'';
}; };
nixos.services = nixos.services =
{ {