nix machine / user configurations
at terra 776 B view raw
1{config, ...}: 2let 3 grafanaCfg = config.services.grafana.settings; 4in 5{ 6 services.grafana = { 7 enable = true; 8 settings = { 9 server = { 10 http_port = 7412; 11 enforce_domain = true; 12 enable_gzip = true; 13 domain = "dash.gaze.systems"; 14 }; 15 security = { 16 cookie_secure = true; 17 }; 18 analytics = { 19 feedback_links_enabled = false; 20 reporting_enabled = false; 21 }; 22 }; 23 }; 24 25 services.nginx.virtualHosts.${grafanaCfg.server.domain} = { 26 useACMEHost = "gaze.systems"; # TODO: write a module to define vhosts for subdomains 27 quic = true; 28 kTLS = true; 29 forceSSL = true; 30 locations."/" = { 31 proxyPass = "http://localhost:${toString grafanaCfg.server.http_port}"; 32 }; 33 }; 34}