From 1b249390818bb0c780c7d4e6addf445ee5a6db79 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Mon, 16 Dec 2024 13:27:44 +0100 Subject: [PATCH] Use magical 'none' LogFile instead of a hacky workaround --- packages/logwatch.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/logwatch.nix b/packages/logwatch.nix index c76ef41..310cdf9 100644 --- a/packages/logwatch.nix +++ b/packages/logwatch.nix @@ -30,7 +30,7 @@ let Title = "${title}"\n '' + '' - LogFile =\nLogFile = logwatch-null\n*JournalCtl = "--output=${output} --unit=${ + LogFile =\nLogFile = none\n*JournalCtl = "--output=${output} --unit=${ if unit != null then unit else "${name}.service" }"\n' > $out/etc/logwatch/conf/services/${name}.conf '' @@ -90,10 +90,6 @@ stdenvNoCC.mkDerivation { '' mkdir -p $out/bin sh install_logwatch.sh - - # Null log necessary to be able to use journalctl - echo -e "LogFile = logwatch-null.log" > $out/etc/logwatch/conf/logfiles/logwatch-null.conf - '' + (lib.concatMapStrings mkJournalCtlEntry journalCtlEntries);