mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:39:23 +08:00
services.gitlab: preprare
This commit is contained in:
28
modules/services/gitlab.nix
Normal file
28
modules/services/gitlab.nix
Normal 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/"
|
||||
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user