Compare commits

..

5 commits

Author SHA1 Message Date
734e30bc45 forgejo/module.nix: inherit mkEnableOption 2025-04-18 14:50:32 +02:00
70221186b2 tower/configuration.nix: enable grafana 2025-04-18 14:50:32 +02:00
f6803029fd tower/configuration.nix: set timeout duration of 30 2025-04-18 14:50:32 +02:00
a5f955ff08 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:50:32 +02:00
bbe481be8a services/grafana: init 2025-04-18 14:50:32 +02:00

View file

@ -8,6 +8,8 @@
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";
@ -20,16 +22,13 @@ 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 = 4021; http_port = port;
root_url = "https://info.copeberg.org"; root_url = "https://${domain}";
domain = "info.copeberg.org"; domain = domain;
enforce_domain = true; enforce_domain = true;
}; };
database = { database = {
@ -48,5 +47,15 @@ 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}";
};
};
};
}; };
} }