From 347bca830ff168bb080fc046dec1bdb4e86c5235 Mon Sep 17 00:00:00 2001 From: Nicholas Tay Date: Thu, 4 Jan 2024 21:12:19 +1100 Subject: [PATCH] Update Fedora setup with chilled kde one Damn I really got to the point of "busy with life, don't worry about it so much" huh... --- content/fedora-setup-i3.md | 213 ++++++++++++++++++++++++++++++++++++ content/fedora-setup.md | 216 +++++++++++++------------------------ 2 files changed, 285 insertions(+), 144 deletions(-) create mode 100644 content/fedora-setup-i3.md diff --git a/content/fedora-setup-i3.md b/content/fedora-setup-i3.md new file mode 100644 index 0000000..d1a509b --- /dev/null +++ b/content/fedora-setup-i3.md @@ -0,0 +1,213 @@ +--- +title: Fedora setup +--- + +Done with Fedora 35 *i3 spin* on X230 laptop. Kind of a build log. + +## Initial setup (Anaconda) + +BTRFS with subvolumes, using Custom. Encryption with LUKS2 enabled. + +- / +- /home +- /var +- /var/log +- /usr/local +- /opt + +Then EFI partitions left as is, /boot and /boot/efi. + +Hostname is set, admin user for self is set up. + +## Post install + +Few things to do before getting dotfiles in. + +### DNF config and update + +Tune settings to be faster before update. `sudo vi /etc/dnf/dnf.conf` + +``` +max_parallel_downloads=10 +fastestmirror=True +deltarpm=1 +``` + +Then `sudo dnf update` to grab the latest updates. + +### Key packages + +Install with dnf: + +- neovim +- git +- picom +- xrdb +- xset +- xinput +- alacritty +- google-noto-sans-fonts + - Noto Sans CJK is included but not just Sans, so for the font to work properly as a default ensure this is installed +- light-locker + +COPR packages (`sudo dnf copr enable `): + +- atim/i3status-rust + - i3status-rust + - There is i3status-rs on the official Fedora repo, but it is not up to date. +- nicholastay/nexpkg + - belluzj-fantasque-sans-mono-fonts + - This is the main monospace font used. + + +### dotfiles + +```sh +$ git clone --bare https://github.com/nicholastay/dotfiles.git ~/.dotfiles.git +$ rm .bashrc .bash_profile .config/i3/config +$ git --git-dir=$HOME/.dotfiles.git/ --work-tree=$HOME checkout + +$ source ~/.bashrc +$ d config --local status.showUntrackedFiles no +$ jg # Jumptool generate aliases +``` + +Probably want to set git user info at `~/.config/git/user`: + +``` +[user] + email = + name = +``` + +### Extra packages + +Good to have RPMFusion so can get extra multimedia things and more: + +```sh +$ sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm +``` + +Install with dnf: + +- NetworkManager-tui + - Why doesn't Fedora come with this, but does with nm-applet? +- zsh + - zsh-syntax-highlighting + - zsh-autosuggestions + - `chsh -s /bin/zsh $USER` +- fzf +- emacs + - Doom Emacs + - (with dotfiles, use `ln -sfn .emacs.d.lite .emacs.d` in homedir to switch to lite) +```sh +$ git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d.doom +$ ln -sfn .emacs.d.doom .emacs.d # (should already be done by dotfiles) +$ ~/.emacs.d/bin/doom install +``` +- keepassxc +- maim +- xclip +- xdotool +- google-noto-serif-fonts +- arc-theme +- ranger +- mpv +- sxiv + - There is feh already but I prefer sxiv +- gnome-calculator + - yeah, could use bc/python but this is just nice to have for quick calcs +- simplescreenrecorder + - there's probably a better solution here, but this works for now +- redshift + redshift-gtk + - f.lux-like night colour overlay +- ffmpeg +- nextcloud-client + - libgnome-keyring - **make sure this is installed or auth won't be saved properly!** +- wireguard-tools + - Helper script is `wgvpn`, put config in `/etc/wireguard/wg0.conf` as usual + +DNF groups (`sudo dnf groupinstall `): + +- `'Development Tools'` +- `'Multimedia'` (needs RPMFusion) + +COPR additions: + +- nicholastay/nexpkg + - dragon-drop-git + - ueberzug + - passgen + +pywal can be grabbed from pip. + +NoMachine server & client: https://www.nomachine.com/download/download&id=3, NoMachine client only: https://www.nomachine.com/download/download&id=14 + +### CJK input and fonts + +For input, the installer should handle ibus with pinyin + hangul on install (I think if add KR and CN during wizard). Otherwise, ensure these are installed: + +- ibus +- ibus-libpinyin +- ibus-hangul + +If it doesn't work, use im-chooser to change to ibus (I don't know why setting just in .profile isn't good enough, had to use .config/imsettings to set it in dotfiles so it should just work with the dotfiles now). + +For fonts, grab from dnf. Mostly my preference since Noto Sans CJK already comes with the system, or else is for monospace usage. + +- Chinese + - wqy-zenhei-fonts +- Korean + - naver-nanum-gothic-fonts + - naver-nanum-gothic-coding-fonts + - naver-nanum-myeongjo-fonts + +### Programming + +Rust + +- rust +- cargo +- rust-src + - Needed for analysis to work properly on std lib +- rust-analyzer + - For completion +```sh +$ curl -L https://github.com/rust-analyzer/rust-analyzer/releases/latest/download/rust-analyzer-x86_64-unknown-linux-gnu.gz | gunzip -c - > ~/.local/bin/rust-analyzer +$ chmod +x ~/.local/bin/rust-analyzer +``` + +C + +- clang-tools-extra + - Comes with clangd for completion + +## Laptop-specific + +dnf packages: + +- tlp + - Remember to enable service +- powertop + - Only used to monitor power draw, not using savings features (left for TLP) + +### ThinkPad-specific + +At least on my X230... + +tlp + +- acpi_call akmod recommended + - Ensure rpmfusion installed +```sh +$ sudo dnf install https://repo.linrunner.de/fedora/tlp/repos/releases/tlp-release.fc$(rpm -E %fedora).noarch.rpm +$ sudo dnf install kernel-devel akmod-acpi_call +``` + +## Misc notes + +Other useful tips/tricks, I guess. + +### Installing fonts + +Place fonts (OTF recommended) into `~/.local/share/fonts`, then reload with `fc-cache -fv`. \ No newline at end of file diff --git a/content/fedora-setup.md b/content/fedora-setup.md index d1a509b..58cf7c8 100644 --- a/content/fedora-setup.md +++ b/content/fedora-setup.md @@ -2,26 +2,23 @@ title: Fedora setup --- -Done with Fedora 35 *i3 spin* on X230 laptop. Kind of a build log. +Done with Fedora 39 *KDE spin* on my desktop. Kind of a build log. Since I don't do much productive things nowadays, this is optimised around laziness and not-actually-a-nice tiling-fancy-thing. See [my older Fedora setup build log thing](/fedora-setup-i3/) for that. ## Initial setup (Anaconda) -BTRFS with subvolumes, using Custom. Encryption with LUKS2 enabled. - -- / -- /home -- /var -- /var/log -- /usr/local -- /opt - -Then EFI partitions left as is, /boot and /boot/efi. +LVM, using Custom. / (root) with the default 70G, /home with the rest. EFI partitions left as is, /boot and /boot/efi. Hostname is set, admin user for self is set up. ## Post install -Few things to do before getting dotfiles in. +### KDE settings + +- Mouse: Flat acceleration curve +- Keyboard: + - Hardware: Delay 200ms, Rate 45/s + - Advanced: Configure keyboard options checked. Caps Lock behavior -> Make Caps Lock an additional Esc +- Night Color: Sunset/sunrise at current location ### DNF config and update @@ -31,6 +28,7 @@ Tune settings to be faster before update. `sudo vi /etc/dnf/dnf.conf` max_parallel_downloads=10 fastestmirror=True deltarpm=1 +install_weak_deps=False ``` Then `sudo dnf update` to grab the latest updates. @@ -39,175 +37,105 @@ Then `sudo dnf update` to grab the latest updates. Install with dnf: -- neovim -- git -- picom -- xrdb -- xset -- xinput -- alacritty -- google-noto-sans-fonts - - Noto Sans CJK is included but not just Sans, so for the font to work properly as a default ensure this is installed -- light-locker - -COPR packages (`sudo dnf copr enable `): - -- atim/i3status-rust - - i3status-rust - - There is i3status-rs on the official Fedora repo, but it is not up to date. -- nicholastay/nexpkg - - belluzj-fantasque-sans-mono-fonts - - This is the main monospace font used. - - -### dotfiles - -```sh -$ git clone --bare https://github.com/nicholastay/dotfiles.git ~/.dotfiles.git -$ rm .bashrc .bash_profile .config/i3/config -$ git --git-dir=$HOME/.dotfiles.git/ --work-tree=$HOME checkout - -$ source ~/.bashrc -$ d config --local status.showUntrackedFiles no -$ jg # Jumptool generate aliases +``` +$ sudo dnf install \ + neovim \ + git \ + kitty ``` -Probably want to set git user info at `~/.config/git/user`: +### Usual packages + +My COPR repo: ``` -[user] - email = - name = +$ sudo dnf copr enable nicholastay/nexpkg ``` -### Extra packages - Good to have RPMFusion so can get extra multimedia things and more: -```sh +``` $ sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm ``` Install with dnf: -- NetworkManager-tui - - Why doesn't Fedora come with this, but does with nm-applet? -- zsh - - zsh-syntax-highlighting - - zsh-autosuggestions - - `chsh -s /bin/zsh $USER` -- fzf -- emacs - - Doom Emacs - - (with dotfiles, use `ln -sfn .emacs.d.lite .emacs.d` in homedir to switch to lite) -```sh -$ git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d.doom -$ ln -sfn .emacs.d.doom .emacs.d # (should already be done by dotfiles) -$ ~/.emacs.d/bin/doom install ``` -- keepassxc -- maim -- xclip -- xdotool -- google-noto-serif-fonts -- arc-theme -- ranger -- mpv -- sxiv - - There is feh already but I prefer sxiv -- gnome-calculator - - yeah, could use bc/python but this is just nice to have for quick calcs -- simplescreenrecorder - - there's probably a better solution here, but this works for now -- redshift + redshift-gtk - - f.lux-like night colour overlay -- ffmpeg -- nextcloud-client - - libgnome-keyring - **make sure this is installed or auth won't be saved properly!** -- wireguard-tools - - Helper script is `wgvpn`, put config in `/etc/wireguard/wg0.conf` as usual - -DNF groups (`sudo dnf groupinstall `): +# Multimedia, swap to use RPMFusion versions (freeworld/nonfree) +$ sudo dnf install @Multimedia --best --allowerasing + +# General Tools +$ sudo dnf install \ + @'Development Tools' \ + zsh \ + zsh-syntax-highlighting \ + zsh-autosuggestions \ + mpv \ + ripgrep + +# My COPR +$ sudo dnf install \ + belluzj-fantasque-sans-mono-fonts \ + passgen +``` -- `'Development Tools'` -- `'Multimedia'` (needs RPMFusion) +### Flatpak Flathub -COPR additions: +I use this for annoying off-the-shelf type of apps: -- nicholastay/nexpkg - - dragon-drop-git - - ueberzug - - passgen +``` +$ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo -pywal can be grabbed from pip. +# At time of writing, the main mirror (Fastly CDN) was being really bad on my internet. +# I only found a China alternative, which was funnily enough, faster. Here it is in case. +$ sudo flatpak remote-modify flathub --url=https://mirror.sjtu.edu.cn/flathub +``` -NoMachine server & client: https://www.nomachine.com/download/download&id=3, NoMachine client only: https://www.nomachine.com/download/download&id=14 +Misc apps: -### CJK input and fonts +``` +$ flatpak install \ + com.discordapp.Discord \ + org.signal.Signal +``` -For input, the installer should handle ibus with pinyin + hangul on install (I think if add KR and CN during wizard). Otherwise, ensure these are installed: +### AppImage -- ibus -- ibus-libpinyin -- ibus-hangul +Occasionally things will be distributed this way and it's whatever. I use AppImageLauncher to integrate it into KDE launcher: https://github.com/TheAssassin/AppImageLauncher/releases - install RPM, then double clicking AppImage files will prompt to register. -If it doesn't work, use im-chooser to change to ibus (I don't know why setting just in .profile isn't good enough, had to use .config/imsettings to set it in dotfiles so it should just work with the dotfiles now). +- Bitwarden: No official flatpak and I don't want to use a password manager without it being legit - https://vault.bitwarden.com/download/?app=desktop&platform=linux -For fonts, grab from dnf. Mostly my preference since Noto Sans CJK already comes with the system, or else is for monospace usage. +### Install dotfiles -- Chinese - - wqy-zenhei-fonts -- Korean - - naver-nanum-gothic-fonts - - naver-nanum-gothic-coding-fonts - - naver-nanum-myeongjo-fonts +TODO: Git repo -### Programming +### Set shell -Rust +The Zoomer Shell -- rust -- cargo -- rust-src - - Needed for analysis to work properly on std lib -- rust-analyzer - - For completion -```sh -$ curl -L https://github.com/rust-analyzer/rust-analyzer/releases/latest/download/rust-analyzer-x86_64-unknown-linux-gnu.gz | gunzip -c - > ~/.local/bin/rust-analyzer -$ chmod +x ~/.local/bin/rust-analyzer +``` +$ chsh -s /bin/zsh $USER ``` -C +## Desktop utilities -- clang-tools-extra - - Comes with clangd for completion +For my mic, I want compressor and EQ to help. `sudo dnf install easyeffects` -## Laptop-specific +## Misc notes -dnf packages: +Other useful tips/tricks, I guess. -- tlp - - Remember to enable service -- powertop - - Only used to monitor power draw, not using savings features (left for TLP) +### Installing fonts -### ThinkPad-specific +Place fonts (OTF recommended) into `~/.local/share/fonts`, then reload with `fc-cache -fv`. -At least on my X230... +### Disabling GRUB boot menu -tlp +When another OS is detected via the prober, it will force showing boot menu every time. We can tell system to ignore this: -- acpi_call akmod recommended - - Ensure rpmfusion installed -```sh -$ sudo dnf install https://repo.linrunner.de/fedora/tlp/repos/releases/tlp-release.fc$(rpm -E %fedora).noarch.rpm -$ sudo dnf install kernel-devel akmod-acpi_call ``` +$ sudo grub2-editenv - set menu_auto_hide=2 -## Misc notes - -Other useful tips/tricks, I guess. - -### Installing fonts - -Place fonts (OTF recommended) into `~/.local/share/fonts`, then reload with `fc-cache -fv`. \ No newline at end of file +# Verify +$ sudo grub2-editenv - list +```