diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2018-11-10 14:47:38 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-10 14:47:38 +0000 |
commit | 1d261945c7f715631efb00c1d45e1f327418a06b (patch) | |
tree | 9a8679c6aa1a9a631d9712ad35cd04e1c596b627 /nixos | |
parent | 69f70ad18a303e4b7782f3bb53d5accd3ca8698a (diff) | |
parent | 8d0b95dc09f9aa6d75378d3375d98785cbca5e3f (diff) | |
download | nixlib-1d261945c7f715631efb00c1d45e1f327418a06b.tar nixlib-1d261945c7f715631efb00c1d45e1f327418a06b.tar.gz nixlib-1d261945c7f715631efb00c1d45e1f327418a06b.tar.bz2 nixlib-1d261945c7f715631efb00c1d45e1f327418a06b.tar.lz nixlib-1d261945c7f715631efb00c1d45e1f327418a06b.tar.xz nixlib-1d261945c7f715631efb00c1d45e1f327418a06b.tar.zst nixlib-1d261945c7f715631efb00c1d45e1f327418a06b.zip |
Merge pull request #50113 from ryantm/monit
nixos/monit: change type of 'config' option to lines
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/monitoring/monit.nix | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/nixos/modules/services/monitoring/monit.nix b/nixos/modules/services/monitoring/monit.nix index d48e5c550abb..32e14ab21ffc 100644 --- a/nixos/modules/services/monitoring/monit.nix +++ b/nixos/modules/services/monitoring/monit.nix @@ -1,33 +1,30 @@ -# Monit system watcher -# http://mmonit.org/monit/ - {config, pkgs, lib, ...}: -let inherit (lib) mkOption mkIf; +with lib; + +let + cfg = config.services.monit; in { - options = { - services.monit = { - enable = mkOption { - default = false; - description = '' - Whether to run Monit system watcher. - ''; - }; - config = mkOption { - default = ""; - description = "monitrc content"; - }; + options.services.monit = { + + enable = mkEnableOption "Monit"; + + config = mkOption { + type = types.lines; + default = ""; + description = "monitrc content"; }; + }; - config = mkIf config.services.monit.enable { + config = mkIf cfg.enable { environment.systemPackages = [ pkgs.monit ]; environment.etc."monitrc" = { - text = config.services.monit.config; + text = cfg.config; mode = "0400"; }; |