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)

114
nixos/flake.lock generated
View File

@@ -1,5 +1,23 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -20,7 +38,85 @@
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nix-openclaw",
"nixpkgs"
]
},
"locked": {
"lastModified": 1767909183,
"narHash": "sha256-u/bcU0xePi5bgNoRsiqSIwaGBwDilKKFTz3g0hqOBAo=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "cd6e96d56ed4b2a779ac73a1227e0bb1519b3509",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nix-openclaw": {
"inputs": {
"flake-utils": "flake-utils",
"home-manager": "home-manager_2",
"nix-steipete-tools": "nix-steipete-tools",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1770414328,
"narHash": "sha256-qjZ+5Kx/EKCaEWeOlxyMzmZRUZCUAa74PiCbNrok4Qc=",
"owner": "openclaw",
"repo": "nix-openclaw",
"rev": "287c9a34c6a5d9928c986556064ec1e4d189e11c",
"type": "github"
},
"original": {
"owner": "openclaw",
"repo": "nix-openclaw",
"type": "github"
}
},
"nix-steipete-tools": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1770240566,
"narHash": "sha256-fY8t41kMSHu2ovf89mIdvC7vkceroCwKxw/MKVn4rsE=",
"owner": "openclaw",
"repo": "nix-steipete-tools",
"rev": "983210e3b6e9285780e87f48ce9354b51a270e95",
"type": "github"
},
"original": {
"owner": "openclaw",
"repo": "nix-steipete-tools",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1767364772,
"narHash": "sha256-fFUnEYMla8b7UKjijLnMe+oVFOz6HjijGGNS1l7dYaQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "16c7794d0a28b5a37904d55bcca36003b9109aaa",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1769461804,
"narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=",
@@ -39,7 +135,23 @@
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
"nix-openclaw": "nix-openclaw",
"nixpkgs": "nixpkgs_2"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},

View File

@@ -8,6 +8,11 @@
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-openclaw = {
url = "github:openclaw/nix-openclaw";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =

View File

@@ -56,7 +56,8 @@
# AI
lmstudio
nodejs
openclaw-gateway
openclaw-tools
# Scripts
(pkgs.writeShellScriptBin "colors" ''
@@ -413,6 +414,7 @@
"_processor_usage_"
"_gpu#1_usage_"
"_memory_usage_"
"_swap_usage_"
"__temperature_max__"
];
icon-style = 1;