From a7049f754ff6e7f0178be5b5d542198e9c48d54f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A1r=C3=A1ndi=20Tam=C3=A1s?= Date: Fri, 28 Jul 2023 19:41:04 +0200 Subject: [PATCH] Override unit if we have a _systemd_user_unit --- modules/wireguard-monitoring/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/wireguard-monitoring/default.nix b/modules/wireguard-monitoring/default.nix index 94154ac..a7238e9 100644 --- a/modules/wireguard-monitoring/default.nix +++ b/modules/wireguard-monitoring/default.nix @@ -68,8 +68,10 @@ in { target_label = "unit"; } { - source_labels = [ "__journal__systemd_user_unit" ]; - target_label = "user_unit"; + source_labels = [ "__journal__systemd_unit" "__journal__systemd_user_unit" ]; + target_label = "unit"; + regex = "(.*);(.+)"; + replacement = "$2"; } ]; }];