Switch to Fedora Silverblue

2021/05/22

分区方案

分区 挂载点 格式 大小
efi /boot/efi efi 512M
boot /boot ext4 1G
root / btrfs 256G
home /var/home ext4 剩余空间

配置软件源与执行首次系统更新

增添RPMFusion源

sudo rpm-ostree install https://mirrors.bfsu.edu.cn/rpmfusion/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.bfsu.edu.cn/rpmfusion/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

增添VSCode源

sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'

更新系统

sudo rpm-ostree update

基础软件

卸载冗余

首先卸载掉来自Fedora的所有flatpak包,之后覆写掉ostree上的如下包:

sudo rpm-ostree override remove gnome-tour google-noto-sans-cjk-ttc-fonts

向ostree增添包

sudo rpm-ostree install gnome-extensions-app gnome-tweaks
sudo rpm-ostree install ffmpegthumbnailer p7zip unrar webp-pixbuf-loader ibus-rime
sudo rpm-ostree install fish neovim clash proxychains-ng ffmpeg-libs mozilla-openh264 hugo
sudo rpm-ostree install code

Toolbox

toolbox create
toolbox enter

sudo dnf install --nogpgcheck https://mirrors.bfsu.edu.cn/rpmfusion/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.bfsu.edu.cn/rpmfusion/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

sudo dnf install nodejs
sudo npm config set registry https://registry.npm.taobao.org
sudo npm install -g nativefier

sudo dnf install ffmpeg youtube-dl proxychains

配置

git

git config --global user.name "qvshuo"
git config --global user.email [email protected]

SSH key

ssh-keygen -t rsa -C [email protected]
cat ~/.ssh/id_rsa.pub

恢复配置文件

git clone [email protected]:qvshuo/fdotfiles.git
./rsync
systemctl --user enable clash

GDM缩放

sudo cp ~/.config/monitors.xml /var/lib/gdm/.config/
sudo chown gdm:gdm /var/lib/gdm/.config/monitors.xml

GRUB定制

sudo rpm-ostree install grub2-tools-extra
sudo su
grub2-mkfont -s 32 -o /boot/grub2/DejaVuSansMono.pf2 /usr/share/fonts/dejavu-sans-mono-fonts/DejaVuSansMono.ttf

nvim /etc/default/grub

GRUB_TIMEOUT=3
GRUB_TERMINAL="gfxterm"
GRUB_FONT=/boot/grub2/DejaVuSansMono.pf2

grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

Firefox

about:config

退格键返回:(将值由2改成0)
browser.backspace_action

双击关闭标签页:
browser.tabs.closeTabByDblclick

硬件加速:(true)
layers.acceleration.force-enabled
gfx.webrender.all

终结内容农场

https://raw.githubusercontent.com/danny0838/content-farm-terminator/gh-pages/files/blocklist/content-farms.txt

flatpak

flatpak --user config --set languages "zh;en"
flatpak --user override --env=LC_ALL=zh_CN.UTF-8
flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak --user remote-modify flathub --url=https://mirror.sjtu.edu.cn/flathub
flatpak install flathub org.gnome.FileRoller
flatpak install flathub org.gnome.eog
flatpak install flathub org.gnome.seahorse.Application

flatpak install flathub org.telegram.desktop
flatpak install flathub net.agalwood.Motrix

flatpak install flathub io.github.celluloid_player.Celluloid
flatpak install flathub org.gnome.Music

flatpak install flathub org.gimp.GIMP

flatpak install flathub com.obsproject.Studio
flatpak install flathub org.blender.Blender

flatpak install flathub org.libreoffice.LibreOffice
flatpak install flathub io.typora.Typora

Gnome Extensions

https://extensions.gnome.org/extension/3193/blur-my-shell/
https://extensions.gnome.org/extension/779/clipboard-indicator/
https://extensions.gnome.org/extension/3843/just-perfection/
https://extensions.gnome.org/extension/2236/night-theme-switcher/

字体

cp fonts ~/.local/share/fonts
chmod 644 fonts
fc-cache -f