mirror of
https://github.com/openclaw/nix-openclaw.git
synced 2026-07-25 05:35:30 -04:00
[PR #24] feat(nixos): add NixOS module for isolated system user #44
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/openclaw/nix-openclaw/pull/24
Author: @jeanlucthumm
Created: 1/26/2026
Status: 🔄 Open
Base:
main← Head:userseg📝 Commits (10+)
50ff5defix: resolve ~ paths in systemd service config006317dfix: bundle extensions dird8fc64bci: auto-update version strings in update-pins.shb608a06feat: add aarch64-linux supporte46f5a2CLAUDE.md4742475PR.md43c0beefeat(nixos): add option definitions for system service modulee745cdafeat(nixos): add main module with systemd hardening9e022e4feat(flake): export nixosModules.clawdbotb9cfeddtest(nixos): add VM integration test for system service module📊 Changes
11 files changed (+1191 additions, -10 deletions)
View changed files
📝
.gitignore(+1 -0)➕
CLAUDE.md(+59 -0)➕
PR.md(+72 -0)📝
flake.nix(+6 -1)➕
nix/checks/nixos-module-test.nix(+88 -0)📝
nix/modules/home-manager/openclaw/config.nix(+9 -9)➕
nix/modules/nixos/documents-skills.nix(+161 -0)➕
nix/modules/nixos/openclaw.nix(+364 -0)➕
nix/modules/nixos/options.nix(+403 -0)📝
nix/scripts/gateway-install.sh(+8 -0)📝
scripts/update-pins.sh(+20 -0)📄 Description
Summary
Adds a NixOS module (
nixosModules.clawdbot) that runs the gateway as an isolated system user with systemd hardening.Closes #22
Security Motivation
Currently the home-manager module runs the gateway as the user's personal account, giving the LLM full access to SSH keys, credentials, personal files, etc. Running as a dedicated locked-down system user contains the blast radius.
Features
clawdbotsystem user with minimal privilegesProtectHome=true,ProtectSystem=strictPrivateTmp=true,PrivateDevices=trueNoNewPrivileges=trueCapabilityBoundingSet=""(no capabilities)SystemCallFilter=@system-serviceinstances.<name>Usage
Test plan
nix build .#checks.x86_64-linux.nixos-clawdbot)Todos
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.