Skip to content

Commit

Permalink
Run nixfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
SFrijters committed Dec 29, 2024
1 parent b60e3e1 commit e4c9571
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
5 changes: 4 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@
logwatch = {
enable = true;
range = "since 24 hours ago for those hours";
services = [ "All" "-zz-network" ];
services = [
"All"
"-zz-network"
];
customServices = [
{
name = "postfix";
Expand Down
13 changes: 8 additions & 5 deletions packages/logwatch.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ let

confFile = writeText "logwatch.conf" (mkConf packageConfig);

mkConf = c:
mkConf =
c:
''
TmpDir = /tmp
mailer = "${lib.getExe' postfix "sendmail"} -t"
Expand All @@ -49,7 +50,8 @@ let
MailFrom = ${c.mailfrom or "Logwatch"}
Range = ${c.range or "Yesterday"}
Detail = ${c.detail or "Low"}
'' + lib.concatMapStrings (s: "Service = ${s}\n") (c.services or [ "All" ]);
''
+ lib.concatMapStrings (s: "Service = ${s}\n") (c.services or [ "All" ]);

# For unstable versions: set rev not-null, for stable versions: set tag not-null
rev = "607f7295353157c1600f56f07395b852cec2a97b";
Expand Down Expand Up @@ -106,7 +108,7 @@ stdenvNoCC.mkDerivation {
sh install_logwatch.sh
cp ${confFile} $out/usr/share/logwatch/default.conf/logwatch.conf
''
+ (lib.concatMapStrings mkCustomService packageConfig.customServices or []);
+ (lib.concatMapStrings mkCustomService packageConfig.customServices or [ ]);

postFixup =
''
Expand Down Expand Up @@ -134,8 +136,9 @@ stdenvNoCC.mkDerivation {
xz
]
}" \
--set pathto_ifconfig "${lib.getExe' nettools "ifconfig"}"
'' + packageConfig.extraFixup or "";
--set pathto_ifconfig "${lib.getExe' nettools "ifconfig"}"
''
+ packageConfig.extraFixup or "";

meta.mainProgram = "logwatch";
}

0 comments on commit e4c9571

Please sign in to comment.