Merge pull request #255179 from Ma27/rm-grafana-migration-error

nixos/grafana: remove hacky deprecation helper from dashbaords & datasources

authored by Maximilian Bosch and committed by GitHub b4dbea19 2215d380

+2 -22
+2 -22
nixos/modules/services/monitoring/grafana.nix
··· 88 88 # Get a submodule without any embedded metadata: 89 89 _filter = x: filterAttrs (k: v: k != "_module") x; 90 90 91 - # FIXME(@Ma27) remove before 23.05. This is just a helper-type 92 - # because `mkRenamedOptionModule` doesn't work if `foo.bar` is renamed 93 - # to `foo.bar.baz`. 94 - submodule' = module: types.coercedTo 95 - (mkOptionType { 96 - name = "grafana-provision-submodule"; 97 - description = "Wrapper-type for backwards compat of Grafana's declarative provisioning"; 98 - check = x: 99 - if builtins.isList x then 100 - throw '' 101 - Provisioning dashboards and datasources declaratively by 102 - setting `dashboards` or `datasources` to a list is not supported 103 - anymore. Use `services.grafana.provision.datasources.settings.datasources` 104 - (or `services.grafana.provision.dashboards.settings.providers`) instead. 105 - '' 106 - else isAttrs x || isFunction x; 107 - }) 108 - id 109 - (types.submodule module); 110 - 111 91 # http://docs.grafana.org/administration/provisioning/#datasources 112 92 grafanaTypes.datasourceConfig = types.submodule { 113 93 freeformType = provisioningSettingsFormat.type; ··· 1160 1140 Declaratively provision Grafana's datasources. 1161 1141 ''; 1162 1142 default = { }; 1163 - type = submodule' { 1143 + type = types.submodule { 1164 1144 options.settings = mkOption { 1165 1145 description = lib.mdDoc '' 1166 1146 Grafana datasource configuration in Nix. Can't be used with ··· 1235 1215 Declaratively provision Grafana's dashboards. 1236 1216 ''; 1237 1217 default = { }; 1238 - type = submodule' { 1218 + type = types.submodule { 1239 1219 options.settings = mkOption { 1240 1220 description = lib.mdDoc '' 1241 1221 Grafana dashboard configuration in Nix. Can't be used with