From cffffeb678e9a1078eeba0f19c9607cda9f31bed Mon Sep 17 00:00:00 2001 From: seth Date: Wed, 7 Feb 2024 18:03:24 -0500 Subject: modules/nixos+darwin: move to traits + archetypes model --- modules/nixos/services/promtail.nix | 47 ------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 modules/nixos/services/promtail.nix (limited to 'modules/nixos/services/promtail.nix') diff --git a/modules/nixos/services/promtail.nix b/modules/nixos/services/promtail.nix deleted file mode 100644 index ced1ece..0000000 --- a/modules/nixos/services/promtail.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.server.services.promtail; - inherit (lib) mkEnableOption mkIf mkOption types; -in { - options.server.services.promtail = { - enable = mkEnableOption "Promtail"; - - clients = mkOption { - type = types.listOf types.attrs; - default = [{}]; - description = "clients for promtail"; - }; - }; - - config.services.promtail = mkIf cfg.enable { - 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"; - } - ]; - } - ]; - }; - }; -} -- cgit v1.2.3