archbox/README.md

69 lines
2.8 KiB
Markdown
Raw Normal View History

2020-10-28 03:17:12 +00:00
# Archbox
2020-10-28 03:54:45 +00:00
Installs Arch Linux inside a chroot enviroment.
2020-10-28 03:17:12 +00:00
## Why?
2020-10-29 05:16:49 +00:00
Ever since I'm running some niche distros like Void, Solus, I had a problem finding softwares I need in their not-so-large repositories, also I don't like how flatpak and snap works. so i decided to create an Arch Linux chroot enviroment everytime I distrohop. Why Arch Linux? They have a really, really good repositories, oh and don't mention how big AUR is.
2020-10-28 03:54:45 +00:00
## Installation
### Installing Archbox
It's pretty easy, just run ```install.sh``` as root.
### Installing chroot enviroment
2020-10-29 05:16:49 +00:00
Before creating chroot enviroment, edit your username in ```/etc/archbox.conf```, then do :
```
sudo archbox --create <archlinux tarball download link>
```
2020-11-02 03:00:22 +00:00
### Removing chroot enviroment
**IMPORTANT**, Make sure you've unmounted everything in chroot enviroment, if you're unsure which partitions must be unmounted, remove the init script and reboot, then delete the folder.
2020-10-28 03:54:45 +00:00
### Entering chroot enviroment
2020-10-29 05:16:49 +00:00
To enter chroot, do :
```
archbox --enter
```
2020-10-28 03:54:45 +00:00
### Executing commands in chroot enviroment
2020-10-29 05:16:49 +00:00
To execute commands inside chroot envirotment, do :
```
archbox <command>
```
for example, to update chroot, do :
```
archbox sudo pacman -Syu
```
2020-10-28 03:54:45 +00:00
### Automount filesystem
2020-10-28 03:57:26 +00:00
If you use runit, copy archbox folder inside ```runit/``` to whatever your distro store runit services and symlink it to whatever your distro store running runit services, if you don't use runit, you may need to create your own init script, or create a cronjob that runs on boot.
2020-10-28 03:17:12 +00:00
### Optional steps
2020-11-01 09:36:27 +00:00
You may want to add this if you don't want to run archbox chroot without password :
2020-10-28 03:17:12 +00:00
#### Sudo
2020-10-29 05:16:49 +00:00
```
%wheel ALL=(root) NOPASSWD: /usr/local/share/archbox/bin/archbox,/usr/local/share/archbox/bin/copyresolv,/usr/local/share/archbox/bin/remount_run
2020-10-29 05:16:49 +00:00
```
2020-10-28 03:17:12 +00:00
#### Doas
2020-10-29 05:16:49 +00:00
```
Idk you're on your own
```
2020-10-28 03:54:45 +00:00
### Misc
#### Lauching apps via rofi
2020-10-29 05:16:49 +00:00
Instead of opening terminal everytime you want to run application inside chroot, you may want to launch rofi inside chroot, install rofi and do :
```
archbox rofi <rofi options>
```
2020-10-28 16:06:06 +00:00
#### Prompt
2020-10-29 17:29:44 +00:00
If you use bash with nerd font you could add a nice little Arch Linux icon in your prompt, add :
2020-10-29 05:16:49 +00:00
```
[[ -e /etc/arch-release ]] && export PS1=" $PS1"
```
to your ```~/.bashrc```
2020-10-29 06:11:29 +00:00
#### Adding enviroment variables
2020-10-29 06:12:09 +00:00
Edit ENV_VAR in ```/etc/archbox.conf```. For example, if you want to use qt5ct as Qt5 theme, edit it like this :
2020-10-29 06:11:29 +00:00
```
ENV_VAR="QT_QPA_PLATFORMTHEME=qt5ct"
```
2020-10-29 17:29:44 +00:00
An example with multiple enviroment variables.
```
ENV_VAR="QT_QPA_PLATFORMTHEME=qt5ct GTK_CSD=0 LD_PRELOAD=/var/home/lemniskett/git_repo/gtk3-nocsd/libgtk3-nocsd.so.0"
```
2020-11-02 10:01:55 +00:00
### Known issues
#### Void Musl (or any Musl-based distros, need confirmation)
Although /run is mounted in chroot enviroment on boot, XDG_RUNTIME_DIR is not visible in chroot enviroment, remounting /run will make it visible. do :
```
archbox --remount-run
```
2020-11-02 10:02:55 +00:00
after user login. Tested in Void Linux musl.