ref: cleanup
This commit is contained in:
parent
0f3ccffd4d
commit
326f4f7f19
7 changed files with 5 additions and 34 deletions
|
|
@ -19,23 +19,3 @@ rec {
|
|||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
# Allow DNS through the firewall
|
||||
networking.firewall.allowedTCPPorts = [ 53 ];
|
||||
networking.firewall.allowedUDPPorts = [ 53 ];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue