Add openclaw as a system package (Dangerous)

This commit is contained in:
2026-02-07 16:04:47 +00:00
parent 449afdaa36
commit 5cb9b1f992
8 changed files with 145 additions and 228 deletions

View File

@@ -98,6 +98,7 @@
# Packages
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [ inputs.nix-openclaw.overlays.default ];
environment.systemPackages = with pkgs; [
git
];
@@ -163,6 +164,27 @@
};
};
# RAM Optimizations (important for AI workloads)
zramSwap = {
enable = true;
algorithm = "zstd";
# Total "virtual" swap size. 100% of RAM is safe for zRAM.
memoryPercent = 100; # Drop to 50% if 64+GB of RAM
};
services.earlyoom = {
enable = true;
# Start killing processes when available RAM drops below 10%
freeMemThreshold = 10; # Drop to 5% if 64+GB of RAM, increase if on <16GB RAM.
# Start killing processes when available swap drops below 10%
freeSwapThreshold = 10;
};
boot.kernel.sysctl = {
"vm.swappiness" = 100;
"vm.vfs_cache_pressure" = 50;
# Helps prevent the system from "stuttering" when it starts swapping
"vm.watermark_boost_factor" = 0;
};
# Open ports in the firewall.
networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [ 11434 ]; # LMStudio (must be manually configured)