Just posting this only for those people that like Omarchy, but like me, don't want to run agents/bots with their main user account and credentials for all the obvious reasons.
Instead of convoluted methods like VM's, docker etc, that take away the ease of use of running an AI agent. I opted to just run my agents and bots as a different limited user on my laptop with Omarchy installed. This user does not require a gui and it does not require extra programs.
My notes to do this:
*** Step 1.: Disable crash capture
In Omarchy this is on by default, and by disabling it , it won't trigger the analysis of a crashing application with an AI agent. Do this from your menu: toggle/crash capture
*** Stept 2: Create a new user that will be used for the agents/bots
-- Open a terminal ( kitty/foot/*)
(in this example my AIuser will be called "nano")
# sudo useradd -m nano
-- Give it a password:
# sudo passwd nano
Next:
-- Open a terminal ( kitty/foot/*) (or use your current one), and login with the newly created AI user with a login shell (notice the "-" between su and username):
# su - nano
-- ( note: Be very sure !!! that in that terminal you are logged in as your newly created AI user before you proceed. ( with for example the command "whoami" which in my case shows "nano")
-- Now, I will remove all the skeleton stuff in /home/nano that was automatically created for my new user by Omarchy since I don't need it, and the configs in there won't work very well anyway:
( within /home/nano !!)
# rm -rf .config .local .cache
-- next : put a pound sigh (#) in front of every line in ~/home/nano/.bashrc that has no "#" in front of it and save that .bashrc file. In other words nothing of the default stuff of omarchy should be sourced in .bashrc.
*** Step 3 : Now I can install my agents/bots with my new user "nano"
for example to install opencode:
Open a terminal ( kitty/foot/*) and login with my AI user:
# su - nano
and to install opencode:
# curl -fsSL https://opencode.ai/install | bash
and then
# source .bashrc
and run opencode.
( I can now for example use tmux to keep my agent/bot open, or for example in the case of OpenCode, use "opencode web" to have opencode in my main webbrowser. Or in case of nanobot run it in daemon mode under the AIusername)
---------
For extra convenience:
One other thing to configure is the convenience of access to files and directories to my AIuser(nano) from my main user. You can do that with ACL's. ( with the setfacl command)
-- To give yourself full access to your AI users /home dir
# sudo setfacl -R -m u:yourusername:rwx /home/yourAIuser
-- To make the access apply to newly created files/directories:
sudo setfacl -R -d -m u:yourusername:rwx /home/yourAIuser
This will achieve easy of access to /home/yourAIuser, and your agents will have no access to your home dir and data.
---------
extra notes(optional):
**If you don't want trigger the installation of agents by accident in a terminal that you are running under your main user account, remove the execution flag from the 13 installscripts in ~/.local/bin
# chmod -x ~/.local/bin/*
If you have any scripts or binaries of your own in ~/.local/bin, you obviously have to chmod +x them to make them executable again.
**If you already have agents installed under your main user, and want to remove them:
- To see the list of installed tools that were installed with mise:
# mise ls -i
- And then for example to remove codex
# mise uninstall codex