fiddeling

This commit is contained in:
Ingolf Wagner 2021-07-13 23:16:00 +02:00
parent 5736b6fccc
commit 5f373a2148
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
3 changed files with 87 additions and 30 deletions

View file

@ -75,30 +75,47 @@ in {
};
backup.dirs = [ config.services.gogs.repositoryRoot ];
#services.gitea = {
# services.nginx = {
# enable = true;
# appName = "Git";
# domain = "git.ingolf-wagner.de";
# httpPort = 3000;
# repositoryRoot = "/home/gitea/repositories";
# stateDir = "/home/gitea";
# rootUrl = "https://git.ingolf-wagner.de/";
# extraConfig = ''
# [service]
# DISABLE_REGISTRATION = true
# SHOW_REGISTRATION_BUTTON = false
# [server]
# SSH_DOMAIN = "git.ingolf-wagner.de"
# SSH_PORT = 443
# START_SSH_SERVER = true
# SSH_LISTEN_PORT = 2222
# [log]
# LEVEL = Warn
# [log.sublogger.macaron]
# LEVEL = Warn
# '';
# statusPage = true;
# virtualHosts = {
# "gitlab.${config.networking.hostName}.private" = {
# extraConfig = error.extraConfig;
# locations."/" = {
# proxyPass = "http://${config.networking.hostName}.private:${
# toString config.services.gitlab.port
# }";
# };
# };
# };
# };
# services.gitlab = {
# enable = true;
# host = "gitlab.${config.networking.hostname}.private";
# port = 9897;
# #databasePasswordFile = "path/todo";
# #initialRootPasswordFile = "path/todo";
#
# secrets = {
# # Make sure the secret is at least 30 characters and all random,
# # no regular words or you'll be exposed to dictionary attacks
# dbFile = "path/todo";
#
# # openssl genrsa 2048
# jwsFile = "path/todo";
#
# # Make sure the secret is at least 30 characters and all random,
# # no regular words or you'll be exposed to dictionary attacks
# otpFile = "path/todo";
#
# # Make sure the secret is at least 30 characters and all random,
# # no regular words or you'll be exposed to dictionary attacks
# secretFile = "path/todo";
# };
#
# # smtp?
#
# # gitlab-runner?
# };
#backup.dirs = [ config.services.gitea.repositoryRoot ];
}

View file

@ -7,4 +7,46 @@ with builtins; {
type = "org.graylog2.outputs.LoggingOutput";
configuration = toJSON ({ prefix = "Writing message: "; });
};
# create default index
resource.graylog_index_set.default =
let
maxIndexSize = 200;
maxIndexCount = 20;
isDefault = false;
in
{
title = "default";
description = ''
This is the default index set, where everything ends up which is
not specifically send to another index.
Be aware this index can only hold ${toString (maxIndexCount * maxIndexSize)}MB of logs!
'';
default = isDefault;
index_prefix = "test-graylog";
rotation_strategy_class =
"org.graylog2.indexer.rotation.strategies.SizeBasedRotationStrategy";
retention_strategy_class =
"org.graylog2.indexer.retention.strategies.DeletionRetentionStrategy";
index_analyzer = "standard";
index_optimization_disabled = true;
writable = true;
shards = 1;
replicas = 0;
index_optimization_max_num_segments = 1;
field_type_refresh_interval = 5000;
retention_strategy = toJSON ({
max_number_of_indices = maxIndexCount;
type =
"org.graylog2.indexer.retention.strategies.DeletionRetentionStrategyConfig";
});
rotation_strategy = toJSON ({
#max_docs_per_index = 30000000;
max_size = maxIndexSize * 1024 * 1024;
type = "org.graylog2.indexer.rotation.strategies.SizeBasedRotationStrategyConfig";
});
};
}

View file

@ -1,9 +1,7 @@
{ pkgs ? import <nixpkgs> { } }:
let
pass_access_token_path = "development/graylog/access_token";
in
let pass_access_token_path = "development/graylog/access_token";
pkgs.mkShell {
in pkgs.mkShell {
buildInputs = with pkgs; [
terranix