hostnamectl set-hostname --static overlord
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
Add this line to /etc/fstab
/swapfile none swap defaults 0 0
sysctl -w vm.swappiness=10
echo 'vm.swappiness=10' | sudo tee /etc/sysctl.d/99-swappiness.conf >/dev/null
https://doc.opensuse.org/documentation/leap/reference/html/book-reference/cha-journalctl.html
sudo systemctl mask hibernate.target hybrid-sleep.target
in /etc/systemd/system.conf
and /etc/systemd/user.conf
:
DefaultTimeoutStartSec=15s
DefaultTimeoutStopSec=15s
Add mitigations=off
to GRUB_CMDLINE_LINUX_DEFAULT
in /etc/default/grub
,
then
on Fedora run:
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
on Debian derivatives run:
sudo update-grub
sudo grubby --update-kernel=ALL --args="mitigations=off"
Reboot and run
lscpu
When creating LVM entities it's good idea to give them discernible names (e.g vg00, lv_data0) so they're easy to spot in output from lvm commands. Naming them just vg, lv, etc. leads to a lot of confusion later.
create PV and add it to VG in one command
vgextend MyVolGroup /dev/fastdisk
writethrough
is safer in case disk fails, writeback
is faster
lvcreate --type cache --cachemode writeback -l 100%FREE -n root_cachepool MyVolGroup/rootvol /dev/fastdisk
lvs -o+cache_mode MyVolGroup/rootvol
lvconvert --uncache MyVolGroup/rootvol
/etc/hosts.custom
# pattern: 0.0.0.0 website-name.domain
0.0.0.0 chip.pl
0.0.0.0 gazeta.pl
0.0.0.0 hckrnews.com
0.0.0.0 interia.pl
0.0.0.0 komputerswiat.pl
0.0.0.0 lobste.rs
0.0.0.0 news.ycombinator.com
0.0.0.0 old.reddit.com
0.0.0.0 onet.pl
0.0.0.0 pcformat.pl
0.0.0.0 pclab.pl
0.0.0.0 phoronix.com
0.0.0.0 radiozet.pl
0.0.0.0 old.reddit.com
0.0.0.0 rmf24.pl
0.0.0.0 spidersweb.pl
0.0.0.0 tokfm.pl
0.0.0.0 twitch.com
0.0.0.0 twitch.tv
#0.0.0.0 twitter.com
0.0.0.0 wp.pl
0.0.0.0 www.chip.pl
0.0.0.0 www.gazeta.pl
0.0.0.0 www.hckrnews.com
0.0.0.0 www.interia.pl
0.0.0.0 www.komputerswiat.pl
0.0.0.0 www.lobste.rs
0.0.0.0 www.news.ycombinator.com
0.0.0.0 www.old.reddit.com
0.0.0.0 www.onet.pl
0.0.0.0 www.pcformat.pl
0.0.0.0 www.pclab.pl
0.0.0.0 www.phoronix.com
0.0.0.0 www.radiozet.pl
0.0.0.0 www.reddit.com
0.0.0.0 www.rmf24.pl
0.0.0.0 www.spidersweb.pl
0.0.0.0 www.tokfm.pl
0.0.0.0 www.twitch.com
0.0.0.0 www.twitch.tv
#0.0.0.0 www.twitter.com
0.0.0.0 www.wp.pl
/etc/systemd/system/update-hosts-block-file.service
[Unit]
Description=Update custom hosts file
Requires=network-online.target
[Service]
Type=oneshot
Environment=HOSTS_URL='https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts'
ExecStart=curl -fLo /tmp/hosts $HOSTS_URL
ExecStart=sed -i '/^fe80/d' /tmp/hosts
ExecStart=/bin/bash -c 'cat /etc/hosts.custom >> /tmp/hosts'
ExecStart=mv /tmp/hosts /etc/hosts
ExecStart=restorecon -v /etc/hosts
PrivateTmp=yes
/etc/systemd/system/update-hosts-block-file.timer
[Unit]
Description=Update custom hosts file
Wants=network-online.target
[Timer]
OnCalendar=weekly
AccuracySec=1h
RandomizedDelaySec=2h
Persistent=true
[Install]
WantedBy=timers.target
Enable timer and update hosts
sudo systemctl daemon-reload
sudo systemctl enable update-hosts-block-file.timer
sudo systemctl start update-hosts-block-file.service
https://www.ctrl.blog/entry/systemd-resolved.html
Resolver listens at 127.0.0.53 and it may be needed to configure NetworkManager to use this DNS addres.
/etc/systemd/resolved.conf.d/custom.conf
[Resolve]
DNS=194.204.152.34 194.204.159.1 8.8.4.4 1.0.0.1 8.8.8.8 1.1.1.1 9.9.9.9
FallbackDNS= 84.200.69.80 84.200.70.40 2606:4700:4700::1111 2606:4700:4700::1001
Domains=~.
DNSSEC=no
#DNSOverTLS=yes # slow as fuck
DNSOverTLS=no
Cache=yes
ReadEtcHosts=yes
sudo ln -s -f /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
sudo systemctl enable --now systemd-resolved.service
sudo systemctl restart NetworkManager.service
Add free repo
sudo rpm --import 'https://rpmfusion.org/keys?action=AttachFile&do=get&target=RPM-GPG-KEY-rpmfusion-free-fedora-'$(rpm -E %fedora) && sync && sudo dnf install 'https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-'$(rpm -E %fedora)'.noarch.rpm' -y && sync
Add non-free repo
sudo rpm --import 'https://rpmfusion.org/keys?action=AttachFile&do=get&target=RPM-GPG-KEY-rpmfusion-nonfree-fedora-'$(rpm -E %fedora) && sync && sudo dnf install 'https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-'$(rpm -E %fedora)'.noarch.rpm' -y && sync
Update AppStream metadata
sudo dnf -y groupupdate core
Install codecs
sudo dnf -y groupupdate multimedia --setop="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin
sudo dnf -y groupupdate sound-and-video
Add tainted repos for dvd support
sudo dnf -y install rpmfusion-free-release-tainted
#sudo dnf -y install rpmfusion-nonfree-release-tainted # non-free firmware
sudo dnf -y install libdvdcss
in /etc/dnf/dnf.conf
fastestmirror=True
rpmconf is used to check for .rpmsave .rpmnew files
sudo dnf install -y rpmconf
dnf-utils provides repoquery
sudo dnf install -y dnf-utils
sudo dnf remove -y \
rhythmbox
cheese \
gnome-classic-session \
gnome-shell-extension-background-logo \
gnome-getting-started-docs \
ibus-{hangul,kcc,libpinyin,libzhuyin,m17n}
sudo dnf group remove -y \
guest-desktop-agents \
x86-baremetal-tools
sudo zypper ar -cfp 90 'https://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_$releasever/' packman
sudo zypper dup --from packman --allow-vendor-change
sudo zypper in ffmpeg
sudo systemctl stop packagekit.service
sudo systemctl disable packagekit.service
sudo systemctl stop packagekit-offline-update.service
sudo systemctl disable packagekit-offline-update.service
gsettings set org.gnome.software allow-updates false
gsettings set org.gnome.software download-updates false
mkdir -p ~/.config/autostart
cp /etc/xdg/autostart/gnome-software-service.desktop ~/.config/autostart/
echo "X-GNOME-Autostart-enabled=false" >> ~/.config/autostart/gnome-software-service.desktop
remove gnome software from search providers - it autostarts gnome software
dconf write /org/gnome/desktop/search-providers/disabled "['org.gnome.Software.desktop']"
in /etc/PackageKit/PackageKit.conf
KeepCache=false
in /etc/PackageKit/CommandNotFound.conf
SingleInstall=warn
sudo dnf install -y vim-default-editor --allowerasing
sudo dnf install -y \
hunspell-pl \
autocorr-pl \
hyphen-pl \
libreoffice-langpack-pl
YaST > Software Management > View > Languages Install pl_PL
In case ~/.esd_auth
files is created:
In /etc/pulse/default.pa
comment out line
load-module-esound-protocol-unix
rm -f ~/.esd_auth
sudo zypper in earlyoom
sudo systemctl enable --now earlyoom.service
# Make Alt-Tab cycle through applications in current workspace only
dconf write /org/gnome/shell/app-switcher/current-workspace-only true
# Font anialiasing
dconf write /org/gnome/settings-daemon/plugins/xsettings/antialiasing "'rgba'"
# Show weekdays and week numbers
dconf write /org/gnome/desktop/calendar/show-weekdate true
dconf write /org/gnome/desktop/interface/clock-show-weekday true
# Disable mouse acceleration
dconf write /org/gnome/desktop/peripherals/mouse/accel-profile "'flat'"
# Caps is Ctrl
dconf write /org/gnome/desktop/input-sources/xkb-options "['lv3:ralt_switch', 'caps:ctrl_modifier', 'shift:both_capslock_cancel']"
# Suspend after 1 hour on inactivity
dconf write /org/gnome/settings-daemon/plugins/power/sleep-inactive-ac-type "'suspend'"
# Disable default gnome-shell settings
dconf write /org/gnome/shell/keybindings/switch-to-application-1 "@as []"
dconf write /org/gnome/shell/keybindings/switch-to-application-2 "@as []"
dconf write /org/gnome/shell/keybindings/switch-to-application-3 "@as []"
dconf write /org/gnome/shell/keybindings/switch-to-application-4 "@as []"
dconf write /org/gnome/shell/keybindings/switch-to-application-5 "@as []"
dconf write /org/gnome/shell/keybindings/switch-to-application-6 "@as []"
dconf write /org/gnome/shell/keybindings/switch-to-application-7 "@as []"
dconf write /org/gnome/shell/keybindings/switch-to-application-8 "@as []"
dconf write /org/gnome/shell/keybindings/switch-to-application-9 "@as []"
# Shift+Super+number moves window to given workspace
dconf write /org/gnome/desktop/wm/keybindings/move-to-workspace-1 "['<Shift><Super>exclam']"
dconf write /org/gnome/desktop/wm/keybindings/move-to-workspace-2 "['<Shift><Super>at']"
dconf write /org/gnome/desktop/wm/keybindings/move-to-workspace-3 "['<Shift><Super>numbersign']"
dconf write /org/gnome/desktop/wm/keybindings/move-to-workspace-4 "['<Shift><Super>dollar']"
dconf write /org/gnome/desktop/wm/keybindings/move-to-workspace-5 "['<Shift><Super>percent']"
dconf write /org/gnome/desktop/wm/keybindings/move-to-workspace-6 "['<Shift><Super>asciicircum']"
dconf write /org/gnome/desktop/wm/keybindings/move-to-workspace-7 "['<Shift><Super>ampersand']"
dconf write /org/gnome/desktop/wm/keybindings/move-to-workspace-8 "['<Shift><Super>asterisk']"
dconf write /org/gnome/desktop/wm/keybindings/move-to-workspace-9 "['<Shift><Super>parenleft']"
# Super+number switches to workspace
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-1 "['<Super>1']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-2 "['<Super>2']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-3 "['<Super>3']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-4 "['<Super>4']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-5 "['<Super>5']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-6 "['<Super>6']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-7 "['<Super>7']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-8 "['<Super>8']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-9 "['<Super>9']"
# Super + esc to lock screen
dconf write /org/gnome/settings-daemon/plugins/media-keys/screensaver "['<Super>Escape']"
sudo dnf install -y \
dconf-editor \
gnome-tweaks \
tilix-nautilus \
gnome-shell-extension-caffeine \
gnome-shell-extension-pomodoro \
gnome-shell-extension-gsconnect \
gnome-shell-extension-drive-menu \
gnome-shell-extension-topicons-plus \
gnome-shell-extension-auto-move-windows \
gnome-shell-extension-windowoverlay-icons
- Clipboard indicator
- Gnome 4x UI improvements
- Impatience
- No Annoyance
- Quick Close in Overview
- Screenshot locations
# Caffeine
dconf write org/gnome/shell/extensions/caffeine/show-notifications false
# Clipboard Indicator
dconf write /org/gnome/shell/extensions/clipboard-indicator/enable-keybindings false
sudo dnf -y remove gnome-terminal-nautilus
TODO
Install pam_kwallet
sudo zypper in pam_kwallet
Create file ~/.config/autostart/ssh-add.desktop
with content:
[Desktop Entry]
Exec=ssh-add -q
Name=ssh-add
Type=Application
IMPORTANT Wallet must be named 'kdewallet' or it won't get automatically unlocked. Don't create wallet manually. You will be propted to create new wallet on next login.
TODO
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.10.2
asdf update
Add the following to ~/.config/fish/config.fish:
source ~/.asdf/asdf.fish
Completions must be configured manually with the following command:
mkdir -p ~/.config/fish/completions; and ln -s ~/.asdf/completions/asdf.fish ~/.config/fish/completions
Add the following to ~/.bashrc:
. $HOME/.asdf/asdf.sh
Completions must be configured by adding the following to your .bashrc:
. $HOME/.asdf/completions/asdf.bash
asdf plugin add direnv
asdf direnv setup --shell fish --version latest
Set global version
asdf list
asdf global direnv <version>
https://jinyuz.dev/2020/07/switching-from-pyenv-rbenv-goenv-and-nvm-to-asdf/
Make sure devel libs are installed
sudo apt install build-essential libreadline-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev liblzma-dev
sudo zypper in readline-devel libbz2-devel libopenssl-devel libffi-devel zlib-devel sqlite3-devel ncurses-devel tk-devel xz-devel
asdf plugin add python
asdf install python latest:3
# set global python version
asdf list
asdf global python <version>
which pip
pip install --upgrade pip
Make sure correct python version is set
pip install --user pipx
pipx install black
pipx install dikicli
pipx install litecli
pipx install neovim-remote
pipx install poetry
pipx install pre-commit
pipx install tldr
pipx install url2kindle
pipx install yt-dlp
pipx install pytest
pipx install nvpy
# go to nvpy repo
pipx runpip nvpy install .
asdf plugin-add opam https://github.com/asdf-community/asdf-opam.git
asdf install opam latest
asdf list opam # check version
asdf global opam <version>
opam init # hook thingy is important
opam install opam-bin
opam-bin install
opam install ocaml-lsp-server ocp-indent ocamlformat utop ppx_jane base dune
~/bin/ocamllsp
#!/bin/bash
eval $(opam env --shell=bash --readonly 2> /dev/null);
ocamllsp
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf install nodejs latest
asdf global nodejs latest
asdf plugin add godot https://github.com/nyrst/asdf-godot.git
asdf install godot latest
asdf global godot latest
asdf plugin add shellcheck https://github.com/luizm/asdf-shellcheck.git
asdf install shellcheck latest
asdf global shellcheck latest
TODO
Add copr repo and install
sudo dnf copr enable rockowitz/ddcutil
sudo dnf install -y ddcutil
Create new group and add yourself as member
sudo groupadd --system i2c
sudo usermod -G i2c -a <username>
Install udev rule
sudo cp /usr/share/ddcutil/data/45-ddcutil-i2c.rules /etc/udev/rules.d/
Load kernel module
echo 'i2c-dev' | sudo tee /etc/modules-load.d/i2c-dev.conf >/dev/null
sudo modprobe i2c-dev
sudo zypper install ripgrep fd jq fzf moreutils mtr pv vifm speedtest-cli tmux rlwrap gh
sudo zypper in fish
sudo rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg
sudo dnf config-manager --add-repo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo
sudo dnf -y install sublime-merge sublime-text
sudo rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg
sudo zypper addrepo -g -f https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo
sudo zypper install sublime-text sublime-merge
TODO
-
AppImage Update
-
AppImage Launcher
TODO
- find profile location in
about:profiles
cd <profile-dir>
get scripts
curl -O 'https://raw.githubusercontent.com/arkenfox/user.js/master/updater.sh'
curl -O 'https://raw.githubusercontent.com/arkenfox/user.js/master/prefsCleaner.sh'
chmod +x updater.sh prefsCleaner.sh
get user-overrides.js
curl -O 'https://gist.githubusercontent.com/silenc3r/91ee03f93dc56afa6cd63db8a81d3559/raw/user-overrides.js'
update
./updater.sh -s -u
TODO
Remove legacy fonts that don't work with subpixel rendering. This fixes Bitstream Charter.
sudo zypper rm xorg-x11-fonts-legacy
sudo zypper in lato-fonts google-merriweather-fonts
Download OpenType.zip from https://github.com/IBM/plex/releases
https://github.com/SorkinType/Gelasio/tree/main/fonts/otf
Install colord-kde
. The in Color Corrections tab install profile system wide.
run
colormgr get-devices
colormgr get-profiles
colormgr device-add-profile <display id> <profile id>
colormgr device-make-profile-default <display id> <profile id>