diff options
| author | Tim Keller <tjk@tjkeller.xyz> | 2026-11-24 12:41:33 -0600 |
|---|---|---|
| committer | Tim Keller <tjk@tjkeller.xyz> | 2026-11-24 12:41:33 -0600 |
| commit | 9be662f071467094379887a653e49a0ae42bb599 (patch) | |
| tree | 3c6637d116d96f6be7da5c100f300f20edd5f8f6 | |
| parent | e50c9565a6319dce70fbf36d9897fad8ae85ee79 (diff) | |
| parent | 8eb00b5e41027aae36aef12c8d70d5b16821ea80 (diff) | |
| download | nixos-9be662f071467094379887a653e49a0ae42bb599.tar.xz nixos-9be662f071467094379887a653e49a0ae42bb599.zip | |
| -rw-r--r-- | flake.lock | 38 | ||||
| -rw-r--r-- | hosts/poweredge-pro/configuration.nix | 1 | ||||
| -rw-r--r-- | hosts/poweredge-pro/dhcp-hosts.nix | 1 | ||||
| -rw-r--r-- | hosts/poweredge-pro/metrics.nix | 44 |
4 files changed, 65 insertions, 19 deletions
@@ -49,11 +49,11 @@ ] }, "locked": { - "lastModified": 1785605892, - "narHash": "sha256-/2Ov0VsC5Ri2sK4HDrYDzpSME96z1E/mROfevcMe2kQ=", + "lastModified": 1793908197, + "narHash": "sha256-rxy/HwVX4gIaKnNUoAmNW/bDUDoJw3a4HmKOy7uT04A=", "ref": "refs/heads/master", - "rev": "106c1b7c7ae2119cf8ab10d87af6e4ca5a21f2e5", - "revCount": 9, + "rev": "58857c9979ffc95feffeeabdcb8f5b6fe6f0acef", + "revCount": 11, "type": "git", "url": "git://git.tjkeller.xyz/firefox-chrome" }, @@ -121,11 +121,11 @@ ] }, "locked": { - "lastModified": 1793392261, - "narHash": "sha256-zUKx9ABhPhtnl0qc3onxfZq27ajnrGJyrWPj9cCdNSc=", + "lastModified": 1794327187, + "narHash": "sha256-Ov1cc9acb/pxJ42sA6OBAXvrVMylLfVCWU2QZLrfMig=", "owner": "AlvaroParker", "repo": "helium-nix", - "rev": "2c8a5035734f05b54332ce16d2e9c3a263c618a6", + "rev": "c2087c74c911111787ee51104d8a5069d4d1de35", "type": "github" }, "original": { @@ -141,11 +141,11 @@ ] }, "locked": { - "lastModified": 1792818383, - "narHash": "sha256-199i7ubVSXTMl+0AAlL7cVCXSjcI+jWByMcimYjeMX0=", + "lastModified": 1794251182, + "narHash": "sha256-R2sZBXiOJo3HAnvTiVkbbHDJy//JMlAwUKEiPbfqPXk=", "owner": "nix-community", "repo": "home-manager", - "rev": "24f2190587513b9c2f73db112a17844ae912d965", + "rev": "6eb2d33d1d0c95a37ef6443c88e6c1686012ee8b", "type": "github" }, "original": { @@ -177,11 +177,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1793294725, - "narHash": "sha256-loLMnbbS4KhmG2ln9EY6f0YMNCA273Yx02oWYQ9IMeE=", + "lastModified": 1794165970, + "narHash": "sha256-XuAV2cUwaod3Bt4XFVqiXz3v1w2ex16W6Sv4S7EWres=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6f06d204d8f2d8761d9da78778745974a3216381", + "rev": "ac588ef1c914865dad517b337ea0eb9694a4021c", "type": "github" }, "original": { @@ -193,11 +193,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1793110635, - "narHash": "sha256-dhoW6VgFWlaodSY5jrBn+CF2FLmaUvDVgM7+C7T2+NM=", + "lastModified": 1794042290, + "narHash": "sha256-ziZn2PvCJE5JEEpqTdxXwJpPB+L3YqoCpTAMCzyaP3U=", "owner": "nixos", "repo": "nixpkgs", - "rev": "31ecbaca1bdefa45dffc409f0250bd8039ea0010", + "rev": "f4a03c008967841f2a0b3cb7c436fc6fc31671f6", "type": "github" }, "original": { @@ -295,11 +295,11 @@ ] }, "locked": { - "lastModified": 1793052255, - "narHash": "sha256-Y/JIHTnMlOabDfyaSBubWGLDIVGihLEUuoMhFvQKaDo=", + "lastModified": 1794261845, + "narHash": "sha256-Ivif/kuD68yEOKcZZG3zSwNMFUuIgzUgeJuzcHrQy+8=", "owner": "Mic92", "repo": "sops-nix", - "rev": "60182817ee048ac94b4c68ea76d5ef2e8aac730d", + "rev": "fe7b4228405aeac2ce7192c2049a6e2bc8637082", "type": "github" }, "original": { diff --git a/hosts/poweredge-pro/configuration.nix b/hosts/poweredge-pro/configuration.nix index 7463cc5..3a45e83 100644 --- a/hosts/poweredge-pro/configuration.nix +++ b/hosts/poweredge-pro/configuration.nix @@ -6,6 +6,7 @@ ./filebrowser.nix ./fileshares.nix ./key.nix + ./metrics.nix ./networking.nix ./nvidia.nix ./ollama.nix diff --git a/hosts/poweredge-pro/dhcp-hosts.nix b/hosts/poweredge-pro/dhcp-hosts.nix index 0a622f7..60b29b5 100644 --- a/hosts/poweredge-pro/dhcp-hosts.nix +++ b/hosts/poweredge-pro/dhcp-hosts.nix @@ -16,6 +16,7 @@ let searxng = { macAddress = "02:00:00:00:77:13"; staticIp = "192.168.77.13"; }; embedtube = { macAddress = "02:00:00:00:77:14"; staticIp = "192.168.77.14"; }; ollama = { macAddress = "02:00:00:00:77:15"; staticIp = "192.168.77.15"; }; + metrics = { macAddress = "02:00:00:00:77:16"; staticIp = "192.168.77.16"; }; WIN-BGBGC27B1PF = { macAddress = "d8:9e:f3:1c:f0:1c"; staticIp = "192.168.77.30"; }; # DACS DESKTOP-CQ4UIF9 = { macAddress = "08:bf:b8:3f:bd:48"; staticIp = "192.168.77.31"; }; # Kyle WIN-6FVMAFOID4G = { macAddress = "00:a0:98:58:10:85"; staticIp = "192.168.77.33"; }; # QB diff --git a/hosts/poweredge-pro/metrics.nix b/hosts/poweredge-pro/metrics.nix new file mode 100644 index 0000000..76ffea9 --- /dev/null +++ b/hosts/poweredge-pro/metrics.nix @@ -0,0 +1,44 @@ +{ config, inputs, ... }: { + imports = [ inputs.telemetry.nixosModules.collectors ]; + + services.telemetry.collectors = { + enable = true; + logs.lokiUrl = "http://metrics:3100"; # The container + }; + + containers.metrics = { + autoStart = true; + privateNetwork = true; + hostBridge = "br-lan0"; + localMacAddress = "02:00:00:00:77:16"; + ephemeral = true; + + # The module reads whatever path you point secretKeyFile at. + bindMounts = { + "/var/lib/prometheus2" = { hostPath = "/nix/persist/metrics/prometheus2"; isReadOnly = false; }; + "/var/lib/loki" = { hostPath = "/nix/persist/metrics/loki"; isReadOnly = false; }; + "/var/lib/grafana" = { hostPath = "/nix/persist/metrics/grafana"; isReadOnly = false; }; + }; + + config = { ... }: { + imports = [ inputs.telemetry.nixosModules.server ]; + + networking.enableIPv6 = false; + networking.interfaces.eth0.useDHCP = true; + networking.hosts."192.168.77.11" = [ "poweredge-pro" ]; + + services.telemetry.server = { + enable = true; + collectorHosts = [ "poweredge-pro" ]; + grafana.generateSecretKey = true; + proxy.enable = true; + }; + + # Pin loki uid+gid + users.users.loki = { uid = 3100; group = "loki"; isSystemUser = true; }; + users.groups.loki.gid = 3100; + + system.stateVersion = "26.05"; + }; + }; +} |
