Skip to content

Commit

Permalink
Declaratively provision matrix-synapse dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Albin Vass committed Apr 27, 2024
1 parent bca5a2b commit 3fe36bc
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 1 deletion.
17 changes: 17 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix.url = "github:Mic92/sops-nix";
matrix-synapse = {
url = "github:element-hq/synapse";
flake = false;
};
};

outputs = { self, nixpkgs, colmena-flake, ... }@inputs: let
Expand All @@ -42,6 +46,7 @@
nodeSpecialArgs = {
steam-servers = { inherit inputs; };
nixpi = { inherit inputs; };
nixos-1 = { inherit inputs; };
};
};

Expand Down
1 change: 1 addition & 0 deletions nixos/hosts/devbox/matrix-synapse/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
{
port = 9002;
type = "metrics";
tls = false;
bind_addresses = ["127.0.0.1"];
resources = [];
}
Expand Down
14 changes: 13 additions & 1 deletion nixos/hosts/devbox/monitoring/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ config, pkgs, ... }: {
{ config, pkgs, inputs, ... }: {
environment.systemPackages = [ pkgs.jdk17_headless ];
services = {
cloudflared.tunnels.devbox.ingress = {
Expand All @@ -8,6 +8,9 @@
prometheus = {
enable = true;
stateDir = "prometheus";
ruleFiles = [
"${inputs.matrix-synapse}/contrib/prometheus/synapse-v2.rules"
];
scrapeConfigs =[
{
job_name = "steam-servers";
Expand All @@ -25,6 +28,15 @@
};
grafana = {
enable = true;
provision = {
dashboards.settings = {
apiVersion = 1;
providers = [{
name = "default";
options.path = "${inputs.matrix-synapse}/contrib/grafana";
}];
};
};
settings = {
server = {
root_url = "https://grafana.albinvass.se";
Expand Down

0 comments on commit 3fe36bc

Please sign in to comment.