Merge pull request #98259 from NixOS/revert-87553-enhancing-monit-module
Revert "nixos/monit: Allow splitting the config in multiple files"
This commit is contained in:
commit
4418b3796e
1 changed files with 4 additions and 14 deletions
|
@ -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";
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue