diff --git a/nixos/modules/services/web-apps/zabbix.nix b/nixos/modules/services/web-apps/zabbix.nix index cffec617c73f..3463148b30e0 100644 --- a/nixos/modules/services/web-apps/zabbix.nix +++ b/nixos/modules/services/web-apps/zabbix.nix @@ -1,9 +1,31 @@ -{ config, lib, options, pkgs, ... }: +{ + config, + lib, + options, + pkgs, + ... +}: let - inherit (lib) mkDefault mkEnableOption mkPackageOption mkRenamedOptionModule mkForce mkIf mkMerge mkOption types; - inherit (lib) literalExpression mapAttrs optionalString optionals versionAtLeast; + inherit (lib) + mkDefault + mkEnableOption + mkPackageOption + mkRenamedOptionModule + mkForce + mkIf + mkMerge + mkOption + types + ; + inherit (lib) + literalExpression + mapAttrs + optionalString + optionals + versionAtLeast + ; cfg = config.services.zabbixWeb; opt = options.services.zabbixWeb; @@ -17,13 +39,25 @@ let ''; - } ]; + } + ]; }; services.nginx = mkIf (cfg.frontend == "nginx") { @@ -266,17 +337,17 @@ in virtualHosts.${cfg.hostname} = mkMerge [ cfg.nginx.virtualHost { - root = mkForce "${cfg.package}/share/zabbix"; - locations."/" = { - index = "index.html index.htm index.php"; - tryFiles = "$uri $uri/ =404"; - }; - locations."~ \.php$".extraConfig = '' - fastcgi_pass unix:${fpm.socket}; - fastcgi_index index.php; - ''; - } - ]; + root = mkForce "${cfg.package}/share/zabbix"; + locations."/" = { + index = "index.html index.htm index.php"; + tryFiles = "$uri $uri/ =404"; + }; + locations."~ \.php$".extraConfig = '' + fastcgi_pass unix:${fpm.socket}; + fastcgi_index index.php; + ''; + } + ]; }; users.users.${user} = mapAttrs (name: mkDefault) { @@ -285,9 +356,6 @@ in inherit group; }; - users.groups.${group} = mapAttrs (name: mkDefault) { - gid = config.ids.gids.zabbix; - }; - + users.groups.${group} = mapAttrs (name: mkDefault) { gid = config.ids.gids.zabbix; }; }; }