diff --git a/flake.nix b/flake.nix index 332200d9..74d9fb0f 100644 --- a/flake.nix +++ b/flake.nix @@ -73,6 +73,8 @@ scrape-nixos-rebuild = mkDeploy "scrape" hostRegistry.hosts.scrape.ip4; dn42-nixos-rebuild = mkDeploy "dn42" hostRegistry.hosts.dn42.ip4; + + grafana-nixos-rebuild = mkDeploy "grafana" "grafana.hq.c3d2.de"; }); nixosConfigurations = let @@ -179,6 +181,14 @@ system = "x86_64-linux"; }; + grafana = nixosSystem' { + modules = [ + ./lib/lxc-container.nix + ./hosts/containers/grafana + ]; + system = "x86_64-linux"; + }; + }; nixosModules.c3d2 = import ./lib; diff --git a/host-registry.nix b/host-registry.nix index d065e14f..852c3586 100644 --- a/host-registry.nix +++ b/host-registry.nix @@ -96,6 +96,10 @@ rec { dn42 = { ip4 = "172.22.99.253"; }; + + grafana = { + ip6 = "2a02:8106:208:5282:4042:fbff:fe4b:2de8"; + }; }; hqGlobal = builtins.attrNames hosts; diff --git a/hosts/containers/grafana/default.nix b/hosts/containers/grafana/default.nix index d6f3daf9..d917ce93 100644 --- a/hosts/containers/grafana/default.nix +++ b/hosts/containers/grafana/default.nix @@ -1,17 +1,12 @@ { config, pkgs, lib, modulesPath, ... }: { - imports = [ - (modulesPath + "/profiles/minimal.nix") - ../../../lib - ../../../lib/lxc-container.nix - ../../../lib/shared.nix - ../../../lib/admins.nix - ]; - c3d2.isInHq = false; + c3d2.hq.interface = "eth0"; services.openssh.enable = true; + # noXlibs breaks cairo: + environment.noXlibs = false; networking.hostName = "grafana"; networking.useNetworkd = true; @@ -28,10 +23,9 @@ services.caddy = { enable = true; - agree = true; config = '' grafana.hq.c3d2.de - proxy / localhost:3000 + reverse_proxy localhost:3000 ''; }; services.grafana = { diff --git a/hq.nixops b/hq.nixops index f90336ee..8b1899bf 100644 --- a/hq.nixops +++ b/hq.nixops @@ -1,18 +1,6 @@ { network.description = "C3D2 HQ"; - "grafana" = - { ... }: - { - imports = [ - hosts/containers/grafana/configuration.nix - ]; - deployment = { - targetHost = "grafana.serv.zentralwerk.dn42"; - storeKeysOnMachine = true; - }; - }; - "dhcp" = { ... }: {