merge zenix onto alpine
This commit is contained in:
commit
e8ebe67ad1
8 changed files with 136 additions and 103 deletions
|
|
@ -1,15 +1,27 @@
|
|||
{config, lib, pkgs, ...}: let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.services.grafana;
|
||||
secrets = config.sops.secrets;
|
||||
mkDashboards = dashboards: pkgs.symlinkJoin {
|
||||
name = "dashboards";
|
||||
paths = map mkDashboard dashboards;
|
||||
};
|
||||
mkDashboard = {name, url, sha256, patch ? lib.id}: pkgs.writeTextFile {
|
||||
inherit name;
|
||||
text = patch (builtins.readFile ( builtins.fetchurl {inherit url sha256;} ));
|
||||
destination = "/dash/${name}.json";
|
||||
};
|
||||
mkDashboards = dashboards:
|
||||
pkgs.symlinkJoin {
|
||||
name = "dashboards";
|
||||
paths = map mkDashboard dashboards;
|
||||
};
|
||||
mkDashboard = {
|
||||
name,
|
||||
url,
|
||||
sha256,
|
||||
patch ? lib.id,
|
||||
}:
|
||||
pkgs.writeTextFile {
|
||||
inherit name;
|
||||
text = patch (builtins.readFile (builtins.fetchurl {inherit url sha256;}));
|
||||
destination = "/dash/${name}.json";
|
||||
};
|
||||
in {
|
||||
sops.secrets."grafana/oidc_client_secret" = {
|
||||
owner = "grafana";
|
||||
|
|
@ -34,24 +46,26 @@ in {
|
|||
role_attribute_path = "contains(groups[*], 'Grafana Admins') && 'Admin' || contains(groups[*], 'Grafana Editors') && 'Editor' || 'Viewer'";
|
||||
};
|
||||
};
|
||||
provision.dashboards.settings.providers = [{
|
||||
name = "Node Exporter";
|
||||
type = "file";
|
||||
options.path = mkDashboards [
|
||||
provision.dashboards.settings.providers = [
|
||||
{
|
||||
name = "node-exporter";
|
||||
url = "https://grafana.com/api/dashboards/1860/revisions/37/download";
|
||||
sha256 = "sha256:0qza4j8lywrj08bqbww52dgh2p2b9rkhq5p313g72i57lrlkacfl";
|
||||
# https://github.com/rfmoz/grafana-dashboards/issues/169
|
||||
patch = builtins.replaceStrings ["$__rate_interval"] ["$__range"];
|
||||
name = "Node Exporter";
|
||||
type = "file";
|
||||
options.path = mkDashboards [
|
||||
{
|
||||
name = "node-exporter";
|
||||
url = "https://grafana.com/api/dashboards/1860/revisions/37/download";
|
||||
sha256 = "sha256:0qza4j8lywrj08bqbww52dgh2p2b9rkhq5p313g72i57lrlkacfl";
|
||||
# https://github.com/rfmoz/grafana-dashboards/issues/169
|
||||
patch = builtins.replaceStrings ["$__rate_interval"] ["$__range"];
|
||||
}
|
||||
{
|
||||
name = "synapse";
|
||||
url = "https://raw.githubusercontent.com/element-hq/synapse/refs/heads/master/contrib/grafana/synapse.json";
|
||||
sha256 = "sha256:0yzj1i4zbjy9cms75ip6ad8qyjgv9kka42gxsbzyzr2syznsmqw0";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "synapse";
|
||||
url = "https://raw.githubusercontent.com/element-hq/synapse/refs/heads/master/contrib/grafana/synapse.json";
|
||||
sha256 = "sha256:16fl81sx1by0wldw4vda0zr1pvbq1dpih1fikzwlvmk63mpc80kb";
|
||||
}
|
||||
];
|
||||
}];
|
||||
];
|
||||
};
|
||||
services.nginx.virtualHosts = {
|
||||
${cfg.settings.server.domain} = {
|
||||
|
|
|
|||
|
|
@ -25,5 +25,22 @@
|
|||
carla
|
||||
drumgizmo
|
||||
distrho-ports
|
||||
surge
|
||||
surge-XT
|
||||
guitarix
|
||||
gxplugins-lv2
|
||||
airwindows-lv2
|
||||
mod-distortion
|
||||
mod-arpeggiator-lv2
|
||||
aether-lv2
|
||||
neural-amp-modeler-lv2
|
||||
bchoppr
|
||||
bshapr
|
||||
chow-tape-model
|
||||
chow-kick
|
||||
chow-phaser
|
||||
chow-centaur
|
||||
quadrafuzz
|
||||
fire
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue