From 39f062a7afbab3389059cbf07b14275b7018d710 Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Wed, 21 Oct 2026 14:40:10 -0400 Subject: [PATCH] safeguarding k3s & removing fwmgr from machines that have hardware with no upstream updates --- hosts/hl-minipc1/default.nix | 1 - hosts/hl-minipc1/hardware.nix | 4 ---- hosts/hl-minipc2/default.nix | 8 +------- hosts/hl-minipc2/hardware.nix | 4 ---- hosts/hl-minipc3/default.nix | 1 - hosts/hl-minipc3/hardware.nix | 4 ---- hosts/hl-terra1/default.nix | 3 --- hosts/hl-terra1/hardware.nix | 4 ---- modules/nixos/common/hardware/default.nix | 2 -- modules/nixos/server/portainer.nix | 4 ++++ 10 files changed, 5 insertions(+), 30 deletions(-) delete mode 100644 hosts/hl-minipc1/hardware.nix delete mode 100644 hosts/hl-minipc2/hardware.nix delete mode 100644 hosts/hl-minipc3/hardware.nix delete mode 100644 hosts/hl-terra1/hardware.nix diff --git a/hosts/hl-minipc1/default.nix b/hosts/hl-minipc1/default.nix index 6f08f0d..2364be6 100644 --- a/hosts/hl-minipc1/default.nix +++ b/hosts/hl-minipc1/default.nix @@ -33,7 +33,6 @@ in imports = [ ./services ./hardware-configuration - ./hardware.nix ]; skyg.user.enable = true; diff --git a/hosts/hl-minipc1/hardware.nix b/hosts/hl-minipc1/hardware.nix deleted file mode 100644 index 209318a..0000000 --- a/hosts/hl-minipc1/hardware.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ ... }: -{ - services.fwupd.enable = true; -} diff --git a/hosts/hl-minipc2/default.nix b/hosts/hl-minipc2/default.nix index dfea8ec..aa302bb 100644 --- a/hosts/hl-minipc2/default.nix +++ b/hosts/hl-minipc2/default.nix @@ -1,14 +1,8 @@ -{ pkgs, config, ... }: -let - staticIp = ip: { - lan = { ipv4_address = ip; }; - }; -in +{ ... }: { imports = [ ./services ./hardware-configuration - ./hardware.nix ./systemd.nix ]; diff --git a/hosts/hl-minipc2/hardware.nix b/hosts/hl-minipc2/hardware.nix deleted file mode 100644 index 209318a..0000000 --- a/hosts/hl-minipc2/hardware.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ ... }: -{ - services.fwupd.enable = true; -} diff --git a/hosts/hl-minipc3/default.nix b/hosts/hl-minipc3/default.nix index c163341..781cb98 100644 --- a/hosts/hl-minipc3/default.nix +++ b/hosts/hl-minipc3/default.nix @@ -2,7 +2,6 @@ { imports = [ ./hardware-configuration - ./hardware.nix ./systemd.nix ./services ]; diff --git a/hosts/hl-minipc3/hardware.nix b/hosts/hl-minipc3/hardware.nix deleted file mode 100644 index 209318a..0000000 --- a/hosts/hl-minipc3/hardware.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ ... }: -{ - services.fwupd.enable = true; -} diff --git a/hosts/hl-terra1/default.nix b/hosts/hl-terra1/default.nix index 8efc626..2665307 100644 --- a/hosts/hl-terra1/default.nix +++ b/hosts/hl-terra1/default.nix @@ -15,7 +15,6 @@ in imports = [ ./services.nix ./hardware-configuration - ./hardware.nix ./systemd.nix ]; @@ -28,8 +27,6 @@ in }; skyg.nixos.desktop.enable = false; skyg.server.admin.enable = true; - - environment.systemPackages = with pkgs; [ btrfs-progs ]; networking.firewall.allowedUDPPorts = openPorts; diff --git a/hosts/hl-terra1/hardware.nix b/hosts/hl-terra1/hardware.nix deleted file mode 100644 index 209318a..0000000 --- a/hosts/hl-terra1/hardware.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ ... }: -{ - services.fwupd.enable = true; -} diff --git a/modules/nixos/common/hardware/default.nix b/modules/nixos/common/hardware/default.nix index 39be013..cfdd982 100644 --- a/modules/nixos/common/hardware/default.nix +++ b/modules/nixos/common/hardware/default.nix @@ -10,8 +10,6 @@ ./amdgpu.nix ./coral-tpu-udev.nix ]; - # Firmware Updater - services.fwupd.enable = true; # Enable all license firmware hardware.enableAllFirmware = true; } diff --git a/modules/nixos/server/portainer.nix b/modules/nixos/server/portainer.nix index 35b8ce6..82ce348 100644 --- a/modules/nixos/server/portainer.nix +++ b/modules/nixos/server/portainer.nix @@ -216,6 +216,8 @@ in wantedBy = [ "multi-user.target" ]; serviceConfig = { Type = "oneshot"; + Restart = "on-failure"; + RestartSec = "15s"; RemainAfterExit = true; Environment = "KUBECONFIG=/etc/rancher/k3s/k3s.yaml"; ExecStart = "${pkgs.kubectl}/bin/kubectl apply -f ${agentManifest}"; @@ -230,6 +232,8 @@ in wantedBy = [ "portainer-agent-k3s.service" ]; serviceConfig = { Type = "oneshot"; + Restart = "on-failure"; + RestartSec = "15s"; RemainAfterExit = true; Environment = "KUBECONFIG=/etc/rancher/k3s/k3s.yaml"; };