all recent config changes
This commit is contained in:
148
hosts/main/setup.md
Normal file
148
hosts/main/setup.md
Normal file
@@ -0,0 +1,148 @@
|
||||
|
||||
## chroot on host
|
||||
```bash
|
||||
btrfs subvolume create /cachy
|
||||
|
||||
mkdir -p /cachy/nix
|
||||
mkdir -p /cachy/proc
|
||||
mkdir -p /cachy/sys
|
||||
mkdir -p /cachy/dev
|
||||
mkdir -p /cachy/out
|
||||
mkdir -p /cachy/home/me/work
|
||||
mount -o bind /proc /cachy/proc
|
||||
mount -o bind /sys /cachy/sys
|
||||
mount -o bind /dev /cachy/dev
|
||||
mount -o bind /nix /cachy/nix
|
||||
mount -o bind / /cachy/out
|
||||
mount -o bind /home/me/work /cachy/home/me/work
|
||||
mount -o bind /run/user/1000 /cachy/run/user/1000
|
||||
mount -t devpts -o gid=5,mode=620 devpts /cachy/dev/pts
|
||||
|
||||
docker run -it -v /cachy:/cachy -v /:/out --privileged cachyos/cachyos /bin/bash
|
||||
```
|
||||
|
||||
## in container:
|
||||
```bash
|
||||
pacstrap -K /cachy base base-devel vim nix less direnv nvim
|
||||
pacstrap -K /cachy wayland firefox alacritty dms-shell git cmake paru
|
||||
|
||||
pacstrap -K /cachy freerdp remmina
|
||||
pacstrap -K /cachy brightnessctl playerctl nm-connection-editor ttf-hack zenity prismlauncher docker inetutils
|
||||
```
|
||||
|
||||
## chroot
|
||||
```bash
|
||||
SHELL=/bin/bash chroot /cachy
|
||||
unset XDG_CONFIG_DIR XDG_DATA_DIRS
|
||||
export WAYLAND_DISPLAY=wayland-1
|
||||
```
|
||||
|
||||
## in chroot
|
||||
```bash
|
||||
# you sometimes need to .... so that df -h can find /
|
||||
mount /
|
||||
|
||||
ln -sf /proc/self/mounts /etc/mtab
|
||||
```
|
||||
|
||||
## link and copy stuff
|
||||
```bash
|
||||
echo "export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" > /root/.bashrc
|
||||
echo "me ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||
echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
|
||||
|
||||
ln -sf /home/me/work/config/hosts/main/bashrc /home/me/.bashrc
|
||||
ln -sf /home/me/work/config/hosts/main/bashrc /root/.bashrc
|
||||
|
||||
ln -fs ~/work/app-data/firefox-data/places.sqlite ~/.mozilla/firefox/me/places.sqlite
|
||||
ln -fs ~/work/app-data/firefox-data/places.sqlite-wal ~/.mozilla/firefox/me/places.sqlite-wal
|
||||
ln -fs ~/work/app-data/firefox-data/onetab-folder ~/.mozilla/firefox/me/storage/default/moz-extension+++e2297551-90b4-4da0-92c8-1d00cda2d080^userContextId=4294967295
|
||||
ln -fs $CONFIG_DIR/hosts/main/firefox-user.js ~/.mozilla/firefox/me/user.js
|
||||
sd ln -fs $CONFIG_DIR/hosts/main/lan-mouse.service /lib/systemd/user/lan-mouse.service
|
||||
sd ln -fs $CONFIG_DIR/hosts/main/elephant.service /lib/systemd/user/elephant.service
|
||||
mkdir -p ~/.config/walker
|
||||
sd ln -fs $CONFIG_DIR/hosts/main/walker.toml ~/.config/walker/config.toml
|
||||
sudo ln -sf /home/me/work/app-data/network-manager /etc/NetworkManager
|
||||
sudo ln -sf $HERE_DIR/waydroid-lib /var/lib/waydroid
|
||||
sudo ln -sf $HERE_DIR/waydroid-data $HOME/.local/share/waydroid
|
||||
ln -s ~/work/app-data/thunderbird ~/.mozilla/thunderbird
|
||||
|
||||
sudo ln -sf $CONFIG_DIR/hosts/main/hosts /etc/hosts
|
||||
|
||||
# docker
|
||||
sudo pacman -S docker
|
||||
sudo systemctl enable --now docker
|
||||
sudo usermod -a -G docker me
|
||||
|
||||
# screencast
|
||||
pacman -S xdg-desktop-portal-hyprland pipewire wireplumber qt6-wayland
|
||||
|
||||
# netbird
|
||||
curl -fsSL https://pkgs.netbird.io/install.sh | sh
|
||||
# move over /var/lib/netbird
|
||||
|
||||
# nixpkgs
|
||||
nix profile add ni#rustdesk ni#yt-dlp ni#delta
|
||||
```
|
||||
|
||||
## fstab
|
||||
```
|
||||
# Static information about the filesystems.
|
||||
# See fstab(5) for details.
|
||||
|
||||
# <file system> <dir> <type> <options> <dump> <pass>
|
||||
#arch_root / 9p trans=virtio,version=9p2000.L,msize=1048576,rw 0 0
|
||||
#work_share /home/me/work 9p trans=virtio,version=9p2000.L,msize=1048576,rw 0 0
|
||||
|
||||
/dev/mapper/root / btrfs rw,relatime,ssd,discard=async,space_cache=v2,compress=zstd:3,subvol=cachy 0 0
|
||||
/dev/mapper/root /home/me/work btrfs rw,relatime,ssd,discard=async,space_cache=v2,compress=zstd:3,subvol=work 0 0
|
||||
/dev/mapper/root /home/me/secrets btrfs rw,relatime,ssd,discard=async,space_cache=v2,compress=zstd:3,subvol=secrets 0 0
|
||||
/dev/mapper/root /home/me/here btrfs rw,relatime,ssd,discard=async,space_cache=v2,compress=zstd:3,subvol=here 0 0
|
||||
/dev/mapper/root /out btrfs rw,relatime,ssd,discard=async,space_cache=v2,compress=zstd:3,subvol=nixos 0 0
|
||||
/dev/mapper/root /nix btrfs rw,relatime,ssd,discard=async,space_cache=v2,compress=zstd:3,subvol=nix 0 0
|
||||
/dev/mapper/root /swap btrfs rw,relatime,ssd,discard=async,space_cache=v2,compress=zstd:3,subvol=swap 0 0
|
||||
|
||||
LABEL=MAIN-BOOT /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
|
||||
|
||||
/swapfile none swap defaults 0 0
|
||||
/home/me/work/app-data/network-manager /etc/NetworkManager none bind 0 0
|
||||
|
||||
```
|
||||
|
||||
# VM
|
||||
```bash
|
||||
sudo systemctl edit getty@tty1 # and put the following in the correct place (read comments)
|
||||
#[Service]
|
||||
#ExecStart=
|
||||
#ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin your_username %I $TERM
|
||||
|
||||
```
|
||||
|
||||
## parts
|
||||
- mounts/disk setup
|
||||
- keyd
|
||||
- lan-mouse
|
||||
- keyring service
|
||||
```
|
||||
sudo ln -fs $CONFIG_DIR/hosts/main/bw.service /lib/systemd/user/bw.service
|
||||
sudo ln -fs $CONFIG_DIR/hosts/main/keyring.service /lib/systemd/user/keyring.service
|
||||
systemctl --user enable --now bw
|
||||
systemctl --user enable --now keyring
|
||||
sudo ln -fs $CONFIG_DIR/zed ~/.config/
|
||||
```
|
||||
|
||||
## log
|
||||
- first tried to run the pacman from nixpkgs (problems)
|
||||
|
||||
- then a nixpkgs basic chroot see ./install.sh (problems)
|
||||
|
||||
- then had the idea to use the cachyos docker container (worked)
|
||||
|
||||
- there are some finicky things with chroot
|
||||
- you need to mount / from in the chroot again... so that df -h can diaplay usage of / (required by pacman)
|
||||
- you need to mount /dev/pts for sudo to work
|
||||
- and this: ln -sf /proc/self/mounts /etc/mtab
|
||||
|
||||
- hyprland can not run in the chroot as it wants the xdg shell wayland proto v6 and the sway outside only has 5
|
||||
|
||||
- so let's go VM
|
||||
Reference in New Issue
Block a user