From 3d1091eb5b50667b71cd174b0beaadddceba2364 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Tue, 28 Aug 2018 23:50:55 +0000 Subject: [PATCH] added a check to make sure a situation where a defined configuration wouldn't be unused as per recommended by @maurer --- nixos/modules/services/monitoring/incron.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nixos/modules/services/monitoring/incron.nix b/nixos/modules/services/monitoring/incron.nix index edba38140c6c..c850bad881c4 100644 --- a/nixos/modules/services/monitoring/incron.nix +++ b/nixos/modules/services/monitoring/incron.nix @@ -59,6 +59,12 @@ in config = mkIf cfg.enable { + assertions = [ + { assertion = cfg.allow != null -> cfg.deny == null; + message = "If `services.incron.allow` is set then `services.incron.deny` will be ignored."; + } + ]; + environment.systemPackages = [ pkgs.incron ]; security.wrappers.incrontab.source = "${pkgs.incron}/bin/incrontab";