Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/hosts/nixos/bigboy/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ in
# Include the results of the hardware scan.
./hardware-configuration.nix
../../../shared/linux/flatpaks.nix
../../../shared/nixos/ports.nix
../../../shared/nixos/ripping.nix
];

Expand Down
24 changes: 15 additions & 9 deletions modules/hosts/nixos/hetznix02/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
config,
inputs,
lib,
pkgs,
username,
...
}:
{
imports = [
../../../shared/nixos/nixroutes.nix
../../../shared/nixos/ports.nix
./disk-config.nix
./hardware-configuration.nix
./post-install
Expand All @@ -33,15 +36,18 @@
];

networking = {
# Open ports in the firewall.
firewall.allowedTCPPorts = [
22 # ssh
80 # Nginx
443 # Nginx
];
# firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# firewall.enable = false;
firewall = {
allowedTCPPorts = lib.pipe config.dots.ports [
builtins.attrValues
(builtins.filter (e: e.openFirewall && e.protocol == "tcp"))
(map (e: e.port))
];
allowedUDPPorts = lib.pipe config.dots.ports [
builtins.attrValues
(builtins.filter (e: e.openFirewall && e.protocol == "udp"))
(map (e: e.port))
];
};

hostId = "89bbb3e6"; # head -c4 /dev/urandom | od -A none -t x4

Expand Down
8 changes: 4 additions & 4 deletions modules/hosts/nixos/hetznix02/post-install/monitoring.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ in
{
job_name = "node";
static_configs = [
{ targets = [ "127.0.0.1:9100" ]; }
{ targets = [ "127.0.0.1:${toString config.dots.ports.node-exporter.port}" ]; }
];
metric_relabel_configs = [
{
Expand All @@ -37,7 +37,7 @@ in
{
job_name = "nginx";
static_configs = [
{ targets = [ "127.0.0.1:9113" ]; }
{ targets = [ "127.0.0.1:${toString config.dots.ports.nginx-exporter.port}" ]; }
];
metric_relabel_configs = [
{
Expand Down Expand Up @@ -84,7 +84,7 @@ in
prometheus.exporters.node = {
enable = true;
listenAddress = "127.0.0.1";
port = 9100;
inherit (config.dots.ports.node-exporter) port;
enabledCollectors = [
"systemd"
];
Expand All @@ -98,7 +98,7 @@ in
prometheus.exporters.nginx = {
enable = true;
listenAddress = "127.0.0.1";
port = 9113;
inherit (config.dots.ports.nginx-exporter) port;
scrapeUri = "https://127.0.0.1/server_status";
sslVerify = false;
};
Expand Down
1 change: 1 addition & 0 deletions modules/hosts/nixos/kiosk-entryway/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
}:
{
imports = [
../../../shared/nixos/ports.nix
./disk-config.nix
./hardware-configuration.nix
./monitoring.nix
Expand Down
4 changes: 2 additions & 2 deletions modules/hosts/nixos/kiosk-entryway/monitoring.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ in
{
job_name = "node";
static_configs = [
{ targets = [ "127.0.0.1:9100" ]; }
{ targets = [ "127.0.0.1:${toString config.dots.ports.node-exporter.port}" ]; }
];
metric_relabel_configs = [
{
Expand Down Expand Up @@ -63,7 +63,7 @@ in
prometheus.exporters.node = {
enable = true;
listenAddress = "127.0.0.1";
port = 9100;
inherit (config.dots.ports.node-exporter) port;
extraFlags = [
"--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|run|tmp|var/lib/docker/.+)($|/)"
"--collector.diskstats.device-exclude=^(loop|ram|fd|sr|dm-|nvme[0-9]n[0-9]p[0-9]+_crypt)$"
Expand Down
2 changes: 2 additions & 0 deletions modules/hosts/nixos/kiosk-gene-desk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
imports = [
# SD card image
"${inputs.nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
../../../shared/nixos/ports.nix
./read-only-root.nix
];

Expand Down Expand Up @@ -92,6 +93,7 @@
};
prometheus.exporters.node = {
enable = true;
inherit (config.dots.ports.node-exporter) port;
enabledCollectors = [
"logind"
"systemd"
Expand Down
1 change: 1 addition & 0 deletions modules/hosts/nixos/rainbow-planet/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
imports = [
./hardware-configuration.nix
../../../shared/linux/flatpaks.nix
../../../shared/nixos/ports.nix
../../../shared/nixos/ripping.nix
];

Expand Down
Loading