From 7d922716af4ed0039671dea2d7247868abda1d36 Mon Sep 17 00:00:00 2001 From: clerie Date: Fri, 16 Aug 2024 20:09:50 +0200 Subject: [PATCH 1/5] hosts/carbon: Add fallback reboot --- hosts/carbon/configuration.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hosts/carbon/configuration.nix b/hosts/carbon/configuration.nix index 0841856..1986f9f 100644 --- a/hosts/carbon/configuration.nix +++ b/hosts/carbon/configuration.nix @@ -64,6 +64,13 @@ ]; }; + systemd.services."system-reboot" = { + script = '' + ${pkgs.systemd}/bin/reboot + ''; + startAt = "*-*-* 1/3:13:14"; + }; + clerie.firewall.enable = true; clerie.monitoring = { From 0c840c1fdfe34d5b3a4728192e7b5abf460dbe03 Mon Sep 17 00:00:00 2001 From: clerie Date: Tue, 20 Aug 2024 12:29:31 +0200 Subject: [PATCH 2/5] hosts/krypton: Allow android usb debugging --- hosts/krypton/android.nix | 9 +++++++++ hosts/krypton/configuration.nix | 1 + 2 files changed, 10 insertions(+) create mode 100644 hosts/krypton/android.nix diff --git a/hosts/krypton/android.nix b/hosts/krypton/android.nix new file mode 100644 index 0000000..3a1d5f5 --- /dev/null +++ b/hosts/krypton/android.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: + +{ + + services.udev.packages = [ + pkgs.android-udev-rules + ]; + +} diff --git a/hosts/krypton/configuration.nix b/hosts/krypton/configuration.nix index bb5600b..2886bc8 100644 --- a/hosts/krypton/configuration.nix +++ b/hosts/krypton/configuration.nix @@ -7,6 +7,7 @@ ../../configuration/desktop + ./android.nix ./backup.nix #./initrd.nix ./network.nix From ae5c16cb28254a99ba9005d8d3e105de6571d962 Mon Sep 17 00:00:00 2001 From: clerie Date: Tue, 20 Aug 2024 15:38:43 +0200 Subject: [PATCH 3/5] hosts/carbon: Add net-mgmt --- hosts/carbon/configuration.nix | 1 + hosts/carbon/net-mgmt.nix | 62 ++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 hosts/carbon/net-mgmt.nix diff --git a/hosts/carbon/configuration.nix b/hosts/carbon/configuration.nix index 1986f9f..7c43fca 100644 --- a/hosts/carbon/configuration.nix +++ b/hosts/carbon/configuration.nix @@ -12,6 +12,7 @@ ./net-heimnetz.nix ./net-iot.nix ./net-lte.nix + ./net-mgmt.nix ./net-voip.nix ./ntp.nix ./ppp.nix diff --git a/hosts/carbon/net-mgmt.nix b/hosts/carbon/net-mgmt.nix new file mode 100644 index 0000000..b4dec25 --- /dev/null +++ b/hosts/carbon/net-mgmt.nix @@ -0,0 +1,62 @@ +{ ... }: + +{ + + networking.vlans."enp1s0.203" = { + id = 203; + interface = "enp1s0"; + }; + networking.bridges."net-mgmt".interfaces = [ + "enp1s0.203" + ]; + networking.interfaces."net-mgmt".ipv6.addresses = [ + { address = "fe80::1"; prefixLength = 64; } + { address = "fd00:152:152:203::1"; prefixLength = 64; } + ]; + networking.interfaces."net-mgmt".ipv4.addresses = [ + { address = "10.152.203.1"; prefixLength = 24; } + ]; + + services.radvd.config = '' + interface net-mgmt { + AdvSendAdvert on; + prefix ::/64 { + AdvValidLifetime 60; + AdvPreferredLifetime 30; + }; + }; + ''; + + services.kea.dhcp4 = { + settings = { + interfaces-config = { + interfaces = [ "net-mgmt" ]; + }; + subnet4 = [ + { + id = 203; + subnet = "10.152.203.0/24"; + pools = [ + { + pool = "10.152.203.100 - 10.152.203.240"; + } + ]; + option-data = [ + { + name = "routers"; + data = "10.152.203.1"; + } + ]; + } + ]; + }; + }; + + clerie.firewall.extraForwardFilterCommands = '' + # Allow access from Heimnetz to MGMT network + ip46tables -A forward-filter -i net-heimnetz -o net-mgmt -j ACCEPT + ip46tables -A forward-filter -i net-mgmt -j DROP + ip46tables -A forward-filter -o net-mgmt -j DROP + ''; + +} From 0a97c381ffe2fb708638644166df6a63579b6800 Mon Sep 17 00:00:00 2001 From: clerie Date: Fri, 23 Aug 2024 17:50:52 +0200 Subject: [PATCH 4/5] hosts/monitoring-3: Fix grafana listening address --- hosts/monitoring-3/grafana.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/monitoring-3/grafana.nix b/hosts/monitoring-3/grafana.nix index 39e6b9c..8637c80 100644 --- a/hosts/monitoring-3/grafana.nix +++ b/hosts/monitoring-3/grafana.nix @@ -7,7 +7,7 @@ domain = "grafana.monitoring.clerie.de"; root_url = "https://grafana.monitoring.clerie.de"; http_port = 3001; - http_addr = "[::1]"; + http_addr = "::1"; }; "auth.anonymous" = { enabled = true; From 1dce42c2527b078b43b21c5950f9adccd127224f Mon Sep 17 00:00:00 2001 From: Flake Update Bot Date: Sat, 24 Aug 2024 03:03:03 +0200 Subject: [PATCH 5/5] Update nixpkgs 2024-08-24-01-03 --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 06a5176..531c7ca 100644 --- a/flake.lock +++ b/flake.lock @@ -288,11 +288,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1722421184, - "narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=", + "lastModified": 1724224976, + "narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58", + "rev": "c374d94f1536013ca8e92341b540eba4c22f9c62", "type": "github" }, "original": {