Compare commits

..

5 commits

Author SHA1 Message Date
18a45773bb forgejo/module.nix: inherit mkEnableOption 2025-04-18 14:44:08 +02:00
92ba05f9cf tower/configuration.nix: enable grafana 2025-04-18 14:44:08 +02:00
00fa8006c0 tower/configuration.nix: set timeout duration of 30 2025-04-18 14:44:08 +02:00
60627d3594 boot/module.nix: add timeout option
On desktop systems, it is convenient to have the timeout
at zero, and just spam space when trying to start
a previous generation. On servers however, it is preferable
to have some time to choose the generation, which is
quite convenient if you have to acess is remotely via a
web interface, which tend to be quite slow and unresponsive.
2025-04-18 14:44:08 +02:00
5cb6dac8ea services/grafana: init 2025-04-18 14:44:08 +02:00

View file

@ -8,8 +8,6 @@
inherit (lib.options) mkEnableOption; inherit (lib.options) mkEnableOption;
cfg = config.modules.system.services.grafana; cfg = config.modules.system.services.grafana;
domain = "info.copeberg.org";
port = 4021;
in { in {
options.modules.system.services.grafana.enable = mkEnableOption "Grafana, a graphing service"; options.modules.system.services.grafana.enable = mkEnableOption "Grafana, a graphing service";
@ -22,13 +20,16 @@ in {
enable = true; enable = true;
package = pkgs.grafana; package = pkgs.grafana;
port = 4021;
domain = "localhost";
settings = { settings = {
server = { server = {
http_addr = "127.0.0.1"; http_addr = "127.0.0.1";
http_port = port; http_port = 4021;
root_url = "https://${domain}"; root_url = "https://info.copeberg.org";
domain = domain; domain = "info.copeberg.org";
enforce_domain = true; enforce_domain = true;
}; };
database = { database = {
@ -47,15 +48,5 @@ in {
# users.allow_signup = false; # users.allow_signup = false;
}; };
}; };
services.nginx = {
enable = true;
virtualHosts.${domain} = {
addSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:${toString port}";
};
};
};
}; };
} }