totoro: install grafana
This commit is contained in:
parent
11c4b77eab
commit
4e20db9fcc
1 changed files with 21 additions and 0 deletions
|
@ -205,6 +205,27 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
services.grafana = {
|
||||
enable = true;
|
||||
addr = "0.0.0.0";
|
||||
domain = "grafana.int.lukegb.com";
|
||||
rootUrl = "https://grafana.int.lukegb.com/";
|
||||
|
||||
extraOptions = let
|
||||
convertName = name: lib.toUpper (builtins.replaceStrings ["." "-"] ["_" "_"] name);
|
||||
convertOptionSection = sectionName: lib.mapAttrsToList (name: value: { name = "GF_${convertName sectionName}_${convertName name}"; inherit value; });
|
||||
convertOptions = opts: builtins.listToAttrs (builtins.concatLists (lib.mapAttrsToList convertOptionSection opts));
|
||||
in convertOptions {
|
||||
"auth.proxy" = {
|
||||
enabled = "true";
|
||||
header_name = "X-Pomerium-Claim-Email";
|
||||
header_property = "email";
|
||||
headers = "username:X-Pomerium-Claim-User";
|
||||
auto_sign_up = "true";
|
||||
};
|
||||
security.cookie_secure = "true";
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "20.03";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue