git.iko.soy/typeable/nixpkgs
on master help sign in
Revert "nixos/monit: Allow splitting the config in multiple files"
commit61863c5155c8b324ac3d16f77b726c7ee3d9bd2f authorRyan Mulligan <ryan@ryantm.com> dateFri 18 Sep 2020, 21:57 (6 years ago) parent9d9d85a
1 file changed+4−14
nixos/modules/services/monitoring/monit.nix+4−14
nixos/modules/services/monitoring/monit.nix+4−14
@@ -4,29 +4,19 @@ with lib;
44
55let
66 cfg = config.services.monit;
7− extraConfig = pkgs.writeText "monitConfig" cfg.extraConfig;
87in
98
109{
11− imports = [
12− (mkRenamedOptionModule [ "services" "monit" "config" ] ["services" "monit" "extraConfig" ])
13− ];
14−
1510 options.services.monit = {
1611
1712 enable = mkEnableOption "Monit";
1813
19− configFiles = mkOption {
20− type = types.listOf types.path;
21− default = [];
22− description = "List of paths to be included in the monitrc file";
23− };
24−
25− extraConfig = mkOption {
14+ config = mkOption {
2615 type = types.lines;
2716 default = "";
28− description = "Additional monit config as string";
17+ description = "monitrc content";
2918 };
19+
3020 };
3121
3222 config = mkIf cfg.enable {
@@ -34,7 +24,7 @@ in
3424 environment.systemPackages = [ pkgs.monit ];
3525
3626 environment.etc.monitrc = {
37− text = concatMapStringsSep "\n" (path: "include ${path}") (cfg.configFiles ++ [extraConfig]);
27+ text = cfg.config;
3828 mode = "0400";
3929 };
4030