diff --git a/configs/mcp.nix b/configs/mcp.nix new file mode 100644 index 0000000..be2ad00 --- /dev/null +++ b/configs/mcp.nix @@ -0,0 +1,21 @@ +# MCP (Metacircular Control Plane) agent user and configuration. +# +# Creates a dedicated 'mcp' system user with rootless podman support. +# The agent runs as this user and manages containers for all platform +# services via /srv/. +{ pkgs, ... }: + +{ + users.users.mcp = { + isSystemUser = true; + group = "mcp"; + home = "/srv/mcp"; + shell = pkgs.shadow; # nologin equivalent + subUidRanges = [{ startUid = 100000; count = 65536; }]; + subGidRanges = [{ startGid = 100000; count = 65536; }]; + # Lingering enables user services (podman) to run without an active login session. + linger = true; + }; + + users.groups.mcp = {}; +}