mirror of
https://github.com/lightly-toasted/nix-config.git
synced 2025-12-10 03:49:44 +00:00
feat(y2q): add grafana
- Add runit service for Grafana - Add Caddy route for grafana.ts.toast.name
This commit is contained in:
parent
18997b1fef
commit
bb37a6c3a8
2 changed files with 26 additions and 0 deletions
|
|
@ -19,6 +19,11 @@
|
||||||
# Glances
|
# Glances
|
||||||
reverse_proxy http://localhost:61208
|
reverse_proxy http://localhost:61208
|
||||||
}
|
}
|
||||||
|
|
||||||
|
http://grafana.ts.toast.name {
|
||||||
|
# Grafana
|
||||||
|
reverse_proxy http://localhost:${config.runit.services.grafana.environment.GF_SERVER_HTTP_PORT}
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
runit.services.caddy = {
|
runit.services.caddy = {
|
||||||
|
|
|
||||||
21
home/modules/runit/services/grafana.nix
Normal file
21
home/modules/runit/services/grafana.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{ pkgs, config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
runit.services.grafana = {
|
||||||
|
script = ''
|
||||||
|
HOME_PATH=$HOME/services/grafana
|
||||||
|
mkdir -p "$HOME_PATH"
|
||||||
|
|
||||||
|
exec ${pkgs.grafana}/bin/grafana server \
|
||||||
|
--homepath ${pkgs.grafana}/share/grafana
|
||||||
|
'';
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
GF_SERVER_HTTP_ADDR = "127.0.0.1";
|
||||||
|
GF_SERVER_HTTP_PORT = "3000";
|
||||||
|
GF_PATHS_DATA = "${config.home.homeDirectory}/services/grafana";
|
||||||
|
};
|
||||||
|
|
||||||
|
log.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue