Move provision
out of settings
This commit is contained in:
parent
f97f3b62c0
commit
9313a6f10a
22
grafana.nix
22
grafana.nix
@ -109,17 +109,6 @@ in {
|
||||
path = "${cfg.state-directory}/database.sqlite";
|
||||
};
|
||||
|
||||
provision = {
|
||||
enable = true;
|
||||
datasources.settings.datasources = let
|
||||
mkDatasource = ds: {
|
||||
editable = false;
|
||||
isDefault = ds.default;
|
||||
inherit (ds) name type url;
|
||||
};
|
||||
in map mkDatasource (attrValues cfg.datasources);
|
||||
};
|
||||
|
||||
auth = mkIf (!isNull cfg.oauth) {
|
||||
signout_redirect_url =
|
||||
"https://${cfg.oauth.hostname}/application/o/${cfg.oauth.slug}/end-session/";
|
||||
@ -142,6 +131,17 @@ in {
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
provision = {
|
||||
enable = true;
|
||||
datasources.settings.datasources = let
|
||||
mkDatasource = ds: {
|
||||
editable = false;
|
||||
isDefault = ds.default;
|
||||
inherit (ds) name type url;
|
||||
};
|
||||
in map mkDatasource (attrValues cfg.datasources);
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user