From d0e12aebc54c35ada2d49c1177b6766446249918 Mon Sep 17 00:00:00 2001 From: Ambrose Chua Date: Wed, 30 Oct 2019 18:14:13 +0800 Subject: [PATCH] Migrating to a new setup --- fedora.sh | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ newlayout.md | 35 ++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 fedora.sh create mode 100644 newlayout.md diff --git a/fedora.sh b/fedora.sh new file mode 100644 index 0000000..65dff2d --- /dev/null +++ b/fedora.sh @@ -0,0 +1,60 @@ +#!/bin/sh + +# Custom Kernel +sudo dnf install fedpkg ccache +fedpkg clone -a kernel +cd kernel +sudo dnf builddep kernel.spec +git checkout origin/f30 # Didn't work... +echo CONFIG_KEYBOARD_APPLESPI=y >> kernel-local +./configs/build_configs.sh # Seems optional +make release +fedpkg local +sudo dnf install --nogpgcheck ./x86_64/kernel-*.rpm + +# ZFS +sudo dnf install http://download.zfsonlinux.org/fedora/zfs-release$(rpm -E %dist).noarch.rpm +sudo dnf install kernel-devel zfs + +# GNOME +dconf write /org/gnome/desktop/input-sources/xkb-options '["caps:escape"]' + +# Sway +sudo dnf install sway +sudo dnf remove rxvt-unicode +sudo dnf copr enable gagbo/kitty-latest +sudo dnf install kitty + +# ZSH +sudo dnf install zsh + +# Yadm +sudo dnf copr enable thelocehiliosan/yadm +sudo dnf install yadm +# Password Store +sudo dnf install pass + +# thefuck +sudo dnf install thefuck + +# Neovim +sudo dnf install neovim + +# Firefox +# Comes with Fedora Workstation, sudo dnf install firefox +# GNOME Web +flatpak install fedora org.gnome.Epiphany +# Geary +flatpak install fedora org.gnome.Geary +# Spotify +flatpak install flathub com.spotify.Client +# Telegram +flatpak install flathub org.telegram.desktop +# Discord +flatpak install flathub com.discordapp.Discord +# Inkscape +#flatpak install flathub org.inkscape.Inkscape +# Krita +#flatpak install flathub org.kde.krita +# darktable +#flatpak install flathub org.darktable.Darktable diff --git a/newlayout.md b/newlayout.md new file mode 100644 index 0000000..48887ea --- /dev/null +++ b/newlayout.md @@ -0,0 +1,35 @@ + +# New OS Layout + +I wanted a new layout for macOS and Fedora to share the same home directory, so here I am using ZFS on Linux and ZFS on macOS side by side. + +## Experiment 1: Shared ZFS Home + +I set up a very typical ZFS mount with encryption and compression, then quickly came to realise that I can't mount at different folders for each OS separately without using legacy mounts. So, I resorted to symlinks: + +``` +~ +❯ ls -lah /home +total 12K +drwxr-xr-x. 3 root root 4.0K Oct 30 15:59 . +dr-xr-xr-x. 21 root root 4.0K Oct 30 16:45 .. +lrwxrwxrwx. 1 root root 19 Oct 30 01:26 ambrose -> /dpool/home/ambrose +drwx------. 14 cooladmin cooladmin 4.0K Oct 30 02:13 cooladmin + +~ +❯ sudo zfs list +[sudo] password for ambrose: +NAME USED AVAIL REFER MOUNTPOINT +dpool 11.7G 89.0G 520K /dpool +dpool/home 11.7G 89.0G 456K /dpool/home +dpool/home/ambrose 11.7G 89.0G 11.7G /dpool/home/ambrose +tankpool 14.9G 3.50T 858K /tankpool +[other tankpool mounts omitted] +``` + +This worked fine, until I realised that Fedora's tool `toolbox` doesn't deal with symlinked home directories. Instead, because it resolves the canonical folder of the home directory, it does not properly mount `/home/ambrose` into `/home/ambrose` but mounts `/dpool/home/ambrose` into `/dpool/home/ambrose` + +Also, I found that Fedora Silverblue has a symlink from `/home` to `/var/home` where the actual home folder is mounted, following conventions. This is neat, I'm going to see if I can use this as a mount point. + + +