Hi list,

On Wed, Nov 18, 2009 at 10:29, Michael Raskin <[email protected]> wrote:
> Modified: nixos/trunk/modules/services/monitoring/monit.nix
> ===================================================================
> --- nixos/trunk/modules/services/monitoring/monit.nix   2009-11-18 08:40:32 
> UTC (rev 18400)
> +++ nixos/trunk/modules/services/monitoring/monit.nix   2009-11-18 09:29:43 
> UTC (rev 18401)
> @@ -37,7 +37,7 @@
>         mode = "0400";
>       }
>     ];
> -    jobs.monit = {
> +    jobs.monit = mkIf config.services.monit.enable {
>       description = "Monit system watcher";
>
>       startOn = config.services.monit.startOn;
>

This is just a general warning on such thing.  The "jobs" attribute
represents an option (cf manual), thus the mkIf statement is declared
inside the "jobs" option.  When monit is not enable such case would
cause the following result:

jobs.monit = {};

This may create an upstart event for monit with nothing in it.  So I
recommend you to write:

jobs = mkIf ...enable {
  monit = { ... };
};

This is a known issue and I'll have to work on it.

-- 
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/
Lars Rasmussen (Google IO 2009) - Icland is an icland.
_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev

Reply via email to