services.gitlab: preprare

This commit is contained in:
2023-11-19 22:01:36 +08:00
parent c38d84a1b1
commit e7708c5647
2 changed files with 29 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
inputs:
{
options.nixos.services.gitlab = let inherit (inputs.lib) mkOption types; in
{
enable = mkOption { type = types.bool; default = false; };
hostname = mkOption { type = types.str; default = "gitlab.chn.moe"; };
};
config =
let
inherit (inputs.config.nixos.services) gitlab;
inherit (inputs.lib) mkIf;
inherit (builtins) map listToAttrs toString replaceStrings filter;
in mkIf gitlab.enable
{
services.gitlab =
{
enable = true;
host = gitlab.hostname;
https = true;
smtp =
{
enable = true;
tls = true;
port = 465;
domain = gitlab.hostname;
username = "bot@chn.moe";
};
redisUrl = "redis://127.0.0.1:6379/"

View File

@@ -9,7 +9,7 @@ inputs:
let
inherit (inputs.config.nixos.services) mastodon;
inherit (inputs.lib) mkIf;
inherit (builtins) map listToAttrs toString replaceStrings filter;
inherit (builtins) toString;
in mkIf mastodon.enable
{
services.mastodon =