diff options
| author | seth <[email protected]> | 2024-02-11 03:12:54 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2024-02-11 03:15:48 -0500 |
| commit | dadd33514c1fdc8ba4890e9334ab0fb89c31d02a (patch) | |
| tree | 20d8f9a31933ee143c5d6d1fefa92f3a5f6d402d /modules/nixos/traits/promtail.nix | |
| parent | 055b48c798039558e2ffde83b589ef6856917bbf (diff) | |
nixos/server: init (again)
Diffstat (limited to 'modules/nixos/traits/promtail.nix')
| -rw-r--r-- | modules/nixos/traits/promtail.nix | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/modules/nixos/traits/promtail.nix b/modules/nixos/traits/promtail.nix deleted file mode 100644 index 5e08b25..0000000 --- a/modules/nixos/traits/promtail.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.traits.promtail; - inherit (lib) types; -in { - options.traits.promtail = { - enable = lib.mkEnableOption "Promtail"; - - clients = lib.mkOption { - type = types.listOf types.attrs; - default = [{}]; - description = "clients for promtail"; - }; - }; - - config = lib.mkIf cfg.enable { - services.promtail = { - enable = true; - configuration = { - inherit (cfg) clients; - server.disable = true; - - scrape_configs = [ - { - job_name = "journal"; - - journal = { - max_age = "12h"; - labels = { - job = "systemd-journal"; - host = "${config.networking.hostName}"; - }; - }; - - relabel_configs = [ - { - source_labels = ["__journal__systemd_unit"]; - target_label = "unit"; - } - ]; - } - ]; - }; - }; - }; -} |
