From 326f4f7f1940e9445729765df330dc766e550165 Mon Sep 17 00:00:00 2001 From: Katharina Heidenreich Date: Fri, 13 Mar 2026 19:51:29 +0100 Subject: [PATCH] ref: cleanup --- data/services.nix | 20 -------------------- data/ssh.nix | 3 --- network/static-ip.nix | 3 --- services/kea.nix | 5 ++--- services/kiwix-updater.nix | 1 - services/kiwix.nix | 6 +++--- services/unbound.nix | 1 - 7 files changed, 5 insertions(+), 34 deletions(-) diff --git a/data/services.nix b/data/services.nix index 8af0db2..7147577 100644 --- a/data/services.nix +++ b/data/services.nix @@ -19,23 +19,3 @@ rec { }; } - - - - - - - - - - - - - - - - - - - - diff --git a/data/ssh.nix b/data/ssh.nix index dac7959..4f1eb8b 100644 --- a/data/ssh.nix +++ b/data/ssh.nix @@ -3,7 +3,6 @@ let readKeyFile = filePath: let content = builtins.readFile filePath; - # Split on newlines and filter out empty strings lines = builtins.filter (line: line != "") ( builtins.filter builtins.isString ( builtins.split "\n" content @@ -11,7 +10,6 @@ let ); in lines; - # Get all keys for a user getUserKeys = username: let userDir = "${allKeyDir}/${username}"; @@ -19,7 +17,6 @@ let if builtins.pathExists userDir then let files = builtins.attrNames (builtins.readDir userDir); - # Read all key files and flatten the list allKeys = builtins.concatMap (file: readKeyFile "${userDir}/${file}" ) files; diff --git a/network/static-ip.nix b/network/static-ip.nix index e069e23..b8a8844 100644 --- a/network/static-ip.nix +++ b/network/static-ip.nix @@ -4,15 +4,12 @@ let net = import ../data/network.nix; in { - # Set a static IP address networking.interfaces.eth0.ipv4.addresses = [{ address = net.ips.pi; prefixLength = net.network.cidr; }]; - # Set default gateway (your router's IP) networking.defaultGateway = net.ips.router; - # Set DNS servers (fallback when Blocky isn't working) networking.nameservers = net.fallback_dns_servers; } diff --git a/services/kea.nix b/services/kea.nix index 634f3be..22e9bac 100644 --- a/services/kea.nix +++ b/services/kea.nix @@ -48,9 +48,8 @@ in }; }; - # Firewall rules for DHCP networking.firewall = { - allowedUDPPorts = [ 67 68 ]; # DHCP ports - checkReversePath = false; # Sometimes needed for DHCP + allowedUDPPorts = [ 67 68 ]; + checkReversePath = false; }; } diff --git a/services/kiwix-updater.nix b/services/kiwix-updater.nix index 356825c..4c1fd0c 100644 --- a/services/kiwix-updater.nix +++ b/services/kiwix-updater.nix @@ -1,7 +1,6 @@ { config, pkgs, lib, ... }: let - # Import service data (make sure this path is correct) service_data = import ../data/services.nix; kiwix = service_data.kiwix; zimUrls = kiwix.urls; diff --git a/services/kiwix.nix b/services/kiwix.nix index b6b656a..c30c6eb 100644 --- a/services/kiwix.nix +++ b/services/kiwix.nix @@ -22,9 +22,9 @@ in { TZ = "Europe/Berlin"; }; extraOptions = [ - "--memory=512m" # Limit container to 512MB RAM - "--memory-swap=512m" # Disable swap usage - "--cpus=1" # Limit to 1 CPU core + "--memory=512m" + "--memory-swap=512m" + "--cpus=1" ]; autoStart = true; }; diff --git a/services/unbound.nix b/services/unbound.nix index a6879f2..56d9d98 100644 --- a/services/unbound.nix +++ b/services/unbound.nix @@ -28,7 +28,6 @@ in }; }; - # Allow DNS through the firewall networking.firewall.allowedTCPPorts = [ 53 ]; networking.firewall.allowedUDPPorts = [ 53 ]; }