0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

Merge pull request #148785 from pennae/more-option-doc-staticizing

treewide: more defaultText for options
This commit is contained in:
Graham Christensen 2021-12-17 11:14:08 -05:00 committed by GitHub
commit 06edb74413
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
107 changed files with 591 additions and 161 deletions

View file

@ -5,14 +5,10 @@ with lib;
let
cfg = config.services.journalbeat;
lt6 = builtins.compareVersions cfg.package.version "6" < 0;
journalbeatYml = pkgs.writeText "journalbeat.yml" ''
name: ${cfg.name}
tags: ${builtins.toJSON cfg.tags}
${optionalString lt6 "journalbeat.cursor_state_file: /var/lib/${cfg.stateDir}/cursor-state"}
${cfg.extraConfig}
'';
@ -57,17 +53,7 @@ in
extraConfig = mkOption {
type = types.lines;
default = optionalString lt6 ''
journalbeat:
seek_position: cursor
cursor_seek_fallback: tail
write_cursor_state: true
cursor_flush_period: 5s
clean_field_names: true
convert_to_numbers: false
move_metadata_to_field: journal
default_type: journal
'';
default = "";
description = "Any other configuration options you want to add";
};