diff options
author | Ryan Mulligan <ryan@ryantm.com> | 2020-09-18 21:57:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-18 21:57:54 -0700 |
commit | 61863c5155c8b324ac3d16f77b726c7ee3d9bd2f (patch) | |
tree | c9dbbcaec047f64b45a11fd9224be7ded0b2b1eb /nixos/modules | |
parent | 9d9d85ae8769620f961fbf625f6a51a338ad7c94 (diff) | |
download | nixpkgs-61863c5155c8b324ac3d16f77b726c7ee3d9bd2f.tar nixpkgs-61863c5155c8b324ac3d16f77b726c7ee3d9bd2f.tar.gz nixpkgs-61863c5155c8b324ac3d16f77b726c7ee3d9bd2f.tar.bz2 nixpkgs-61863c5155c8b324ac3d16f77b726c7ee3d9bd2f.tar.lz nixpkgs-61863c5155c8b324ac3d16f77b726c7ee3d9bd2f.tar.xz nixpkgs-61863c5155c8b324ac3d16f77b726c7ee3d9bd2f.tar.zst nixpkgs-61863c5155c8b324ac3d16f77b726c7ee3d9bd2f.zip |
Revert "nixos/monit: Allow splitting the config in multiple files"
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/monitoring/monit.nix | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/nixos/modules/services/monitoring/monit.nix b/nixos/modules/services/monitoring/monit.nix index aa51b83912c..ca935227217 100644 --- a/nixos/modules/services/monitoring/monit.nix +++ b/nixos/modules/services/monitoring/monit.nix @@ -4,29 +4,19 @@ with lib; let cfg = config.services.monit; - extraConfig = pkgs.writeText "monitConfig" cfg.extraConfig; in { - imports = [ - (mkRenamedOptionModule [ "services" "monit" "config" ] ["services" "monit" "extraConfig" ]) - ]; - options.services.monit = { enable = mkEnableOption "Monit"; - configFiles = mkOption { - type = types.listOf types.path; - default = []; - description = "List of paths to be included in the monitrc file"; - }; - - extraConfig = mkOption { + config = mkOption { type = types.lines; default = ""; - description = "Additional monit config as string"; + description = "monitrc content"; }; + }; config = mkIf cfg.enable { @@ -34,7 +24,7 @@ in environment.systemPackages = [ pkgs.monit ]; environment.etc.monitrc = { - text = concatMapStringsSep "\n" (path: "include ${path}") (cfg.configFiles ++ [extraConfig]); + text = cfg.config; mode = "0400"; }; |