···88 # Get a submodule without any embedded metadata:
89 _filter = x: filterAttrs (k: v: k != "_module") x;
9091- # 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 # http://docs.grafana.org/administration/provisioning/#datasources
112 grafanaTypes.datasourceConfig = types.submodule {
113 freeformType = provisioningSettingsFormat.type;
···1160 Declaratively provision Grafana's datasources.
1161 '';
1162 default = { };
1163- type = submodule' {
1164 options.settings = mkOption {
1165 description = lib.mdDoc ''
1166 Grafana datasource configuration in Nix. Can't be used with
···1235 Declaratively provision Grafana's dashboards.
1236 '';
1237 default = { };
1238- type = submodule' {
1239 options.settings = mkOption {
1240 description = lib.mdDoc ''
1241 Grafana dashboard configuration in Nix. Can't be used with
···88 # Get a submodule without any embedded metadata:
89 _filter = x: filterAttrs (k: v: k != "_module") x;
900000000000000000000091 # http://docs.grafana.org/administration/provisioning/#datasources
92 grafanaTypes.datasourceConfig = types.submodule {
93 freeformType = provisioningSettingsFormat.type;
···1140 Declaratively provision Grafana's datasources.
1141 '';
1142 default = { };
1143+ type = types.submodule {
1144 options.settings = mkOption {
1145 description = lib.mdDoc ''
1146 Grafana datasource configuration in Nix. Can't be used with
···1215 Declaratively provision Grafana's dashboards.
1216 '';
1217 default = { };
1218+ type = types.submodule {
1219 options.settings = mkOption {
1220 description = lib.mdDoc ''
1221 Grafana dashboard configuration in Nix. Can't be used with