selinux, zstd, flatpak, thinkfan, thinkpad t430, thinkpad t480, tailscale, vscode, nix, rpm-fusion, disable network connectivity check, battery charge threshold, gnome, nautilus, ptyxis-terminal, boxes, celluloid, declarative system changes
https://github.com/queeup/silverblue-kickstarter
Note
I also want to add disable discard=async with nodiscard
mount option. Because I prefer to use fstrim.timer instead.
sed -i 's/compress=zstd:1/noatime,nodiscard,compress=zstd:3/' /etc/fstab-
Compress whole system with zstd version 3
https://wiki.archlinux.org/title/Btrfs#Compression
sudo btrfs filesystem defragment -r -v -czstd --level 3 /
-
https://www.cyberciti.biz/faq/disable-selinux-on-centos-7-rhel-7-fedora-linux/
sudo sed -i 's/SELINUX=enforcing/SELINUX=permissive/' /etc/selinux/config
flatpak uninstall --all --delete-data --assumeyes # prefered flathub remote
flatpak remote-modify --disable fedorarpm-ostree override remove \
gnome-tour \
firefox `# prefered flatpak version instead of this` \
firefox-langpacks \
fedora-workstation-repositories `# nvidia, crome, steam, pycharm` \
gnome-classic-sessionflatpak remote-add --system --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak remote-modify --enable flathub
flatpak install flathub \
org.gnome.baobab \
org.gnome.Boxes \
org.gnome.Calculator \
org.gnome.Calendar \
org.gnome.clocks \
org.gnome.Decibels \
org.gnome.Evince \
org.gnome.FileRoller \
org.gnome.Geary \
org.gnome.Logs \
org.gnome.Loupe \
org.gnome.NautilusPreviewer `# previewer for nautilus: activate with <space>` \
org.gnome.NetworkDisplays \
org.gnome.Shotwell \
org.gnome.TextEditor \
org.gnome.Weather \
org.bleachbit.BleachBit \
org.freedesktop.Platform.ffmpeg-full `# for firefox hardware decoding` \
org.mozilla.firefox \
org.telegram.desktop \
com.bitwarden.desktop \
com.discordapp.Discord \
com.github.tchx84.Flatseal \
com.github.jeromerobert.pdfarranger \
com.github.qarmin.czkawka \
com.github.qarmin.szyszka \
com.logseq.Logseq \
io.github.celluloid_player.Celluloid `# celluloid player contains all codecs.` \
io.gitlab.elescoute.password \
io.github.shiftey.Desktop \
im.riot.Riot \
de.haeckerfelix.Fragments \
app.fotema.Fotema-
-
Geary
flatpak override --user --env=GTK_THEME=Adwaita:dark org.gnome.Geary
-
rpm-ostree install --assumeyes --apply-live \
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 \
&& rpm-ostree update \
--uninstall rpmfusion-free-release-$(rpm -E %fedora)-1.noarch \
--uninstall rpmfusion-nonfree-release-$(rpm -E %fedora)-1.noarch \
--install rpmfusion-free-release \
--install rpmfusion-nonfree-releaserpm-ostree override remove mesa-va-drivers \
--install intel-media-driver
rpm-ostree kargs --append=i915.enable_guc=2-
Layered (preferred)
https://github.com/castrojo/ublue/blob/main/bits/tailscale
sudo curl -s https://pkgs.tailscale.com/stable/fedora/tailscale.repo -o /etc/yum.repos.d/tailscale.repo > /dev/null sudo sed -i 's/repo_gpgcheck=1/repo_gpgcheck=0/' /etc/yum.repos.d/tailscale.repo rpm-ostree install --apply-live tailscale sudo systemctl enable --now tailscaled sudo tailscale up
-
Container (ssh not working on container environment)
https://hub.docker.com/r/tailscale/tailscale
podman run --restart=always \ --detach \ --name=tailscaled \ --volume tailscale:/var/lib \ --device /dev/net/tun \ --network=host \ --cap-add=NET_ADMIN \ --cap-add=NET_RAW \ tailscale/tailscale podman exec tailscaled tailscale up
https://github.com/castrojo/ublue/blob/main/bits/vscode
cat <<EOF | sudo tee /etc/yum.repos.d/vscode.repo
[code]
name=Visual Studio Code
baseurl=https://packages.microsoft.com/yumrepos/vscode
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
EOF
rpm-ostree install code-
User settings
{ "window.titleBarStyle": "custom", "python.experiments.enabled": false, "python.formatting.provider": "black", "editor.formatOnSave": true, "telemetry.telemetryLevel": "off", "update.mode": "none", "terminal.integrated.shellIntegration.enabled": true, "terminal.integrated.shellIntegration.history": 100000, "editor.fontSize": 15, "window.zoomLevel": 0.25, "editor.renderWhitespace": "trailing" }
Warning
Disable composefs or enable root.transient before install and use nix on Fedora Silverblue 42. Do not mix both. Use just one method. I prefer enabling root.transient.
-
sudo sed -i 's/,ro//' /etc/fstab sudo rpm-ostree kargs --append='ostree.prepare-root.composefs=0' --reboot
-
sudo tee /etc/ostree/prepare-root.conf <<'EOL' [composefs] enabled = yes [root] transient = true EOL rpm-ostree initramfs-etc --reboot --track=/etc/ostree/prepare-root.conf
How to install nix package manager to silverblue
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \
sh -s -- install ostree --no-confirm --persistence=/var/lib/nixnix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs
nix-channel --updateecho "Defaults secure_path = /nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:$(sudo printenv PATH)" | sudo tee /etc/sudoers.d/nix-sudo-env$ nix-env --query --installed --json | jq '[.[]] | sort | [.[].pname] | join(" ")' --raw-output
bat bottom broot du-dust dua duf eza fd grex jq nix procs restic ripgrep rmlint screen starship sysz tldr xhPlease read the config manpage thinkfan.conf(5) before playing around with this.
This is NOT a working config file that can just be copied. It is only meant to give a rough idea what can be done. In particular, don't copy & paste the fan speed config! Think about what you're doing.
If you don't know what temperatures are right for your system, you should not be using thinkfan!
rpm-ostree install --apply-live thinkfan
rpm-ostree kargs --append=thinkpad_acpi.fan_control=1
systemctl enable thinkfan-
/etc/systemd/system/thinkfan.service.d/override.conf# https://github.com/vmatare/thinkfan/issues/36#issuecomment-567630136 [Service] Restart=on-failure RestartSec=5s
/etc/thinkfan.conf
# Help: /usr/share/doc/thinkfan/thinkfan.yaml
# https://github.com/vmatare/thinkfan/issues/146#issuecomment-892987429
sensors:
- hwmon: /sys/class/hwmon
name: thinkpad
indices: [1]
#- tpacpi: /proc/acpi/ibm/thermal
# Bug: https://github.com/vmatare/thinkfan/issues/139#issuecomment-874160793
#indices: [1]
fans:
- tpacpi: /proc/acpi/ibm/fan
levels:
# Thinkpad T430
- [0, 0, 55]
- [1, 52, 60]
- [2, 58, 70]
- [3, 67, 75]
- [4, 73, 85]
- [5, 82, 90]
- ["level disengaged", 87, 255]/etc/hinkfan.conf
# Help: /usr/share/doc/thinkfan/thinkfan.yaml
# https://github.com/vmatare/thinkfan/issues/146#issuecomment-892987429
sensors:
#- hwmon: /sys/class/hwmon
# name: thinkpad
# indices: [1]
- tpacpi: /proc/acpi/ibm/thermal
# Bug: https://github.com/vmatare/thinkfan/issues/139#issuecomment-874160793
# indices: [1]
#https://github.com/vmatare/thinkfan/blob/c6e48a95b339cfef22439f9ce32c13bb324502b2/examples/thinkfan.yaml#L65
#https://github.com/vmatare/thinkfan/discussions/208#discussioncomment-4189705
#- hwmon: /sys/devices/platform/coretemp.0/hwmon/hwmon9
# indices: [1]
fans:
- tpacpi: /proc/acpi/ibm/fan
levels:
# Thinkpad T480
- [0, 0, 58]
- [1, 56, 64]
- [2, 62, 74]
- [3, 72, 80]
- [4, 78, 86]
- [5, 84, 90]
- ["level disengaged", 87, 255]echo "AutomaticUpdatePolicy=stage" | sudo tee --append /etc/rpm-ostreed.conf
echo "Recommends=false" | sudo tee --append /etc/rpm-ostreed.confsudo tee /etc/NetworkManager/conf.d/20-connectivity-fedora.conf <<EOF
## Bug https://discussion.fedoraproject.org/t/hotspot-popup-window/82237
[connectivity]
enabled=false
EOFNote
Gnome 48 has battery charge threshold feature support up to %80. Use this method only if you want set less then %80. Disable Gnome battery saver before use this.
-
charge_control_start_threshold=0 -
charge_control_stop_threshold=100
Use one of method belove:
echo 40 | sudo tee /sys/class/power_supply/BAT*/charge_control_start_threshold
echo 60 | sudo tee /sys/class/power_supply/BAT*/charge_control_end_threshold
# OR
sudo sh -c "echo 40 | tee /sys/class/power_supply/BAT*/charge_control_start_threshold"
sudo sh -c "echo 60 | tee /sys/class/power_supply/BAT*/charge_control_end_threshold"sudo tee /etc/udev/rules.d/99-queeup_battery-charge-threshold.rules <<EOF
# https://askubuntu.com/a/1211506
# https://wiki.archlinux.org/title/Laptop/ASUS#Battery_charge_threshold
# https://support.system76.com/articles/laptop-battery-thresholds/
KERNEL=="BAT*", SUBSYSTEM=="power_supply", ATTR{charge_control_start_threshold}="40"
KERNEL=="BAT*", SUBSYSTEM=="power_supply", ATTR{charge_control_end_threshold}="60"
EOF
sudo systemctl reload-or-restart systemd-udevdhttps://wiki.archlinux.org/title/Laptop/ASUS#systemd_service
sudo tee /etc/systemd/system/battery-charge-threshold.service <<EOF
# https://wiki.archlinux.org/title/Laptop/ASUS#systemd_service
# https://support.system76.com/articles/laptop-battery-thresholds/
# Lenovo Thinkpad T480 have 2 battery. BAT0 & BAT1.
# So I use BAT* for Execstart command
[Unit]
Description=Set the battery charge threshold
After=multi-user.target
StartLimitBurst=0
[Service]
Type=oneshot
Restart=on-failure
ExecStart=/bin/sh -c 'echo 60 > /sys/class/power_supply/BAT*/charge_control_end_threshold'
ExecStart=/bin/sh -c 'echo 40 > /sys/class/power_supply/BAT*/charge_control_start_threshold'
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now battery-charge-threshold-
Enable hardware decoding in Firefox
https://asus-linux.org/wiki/fedora-silverblue-guide/#enable-hardware-decoding-in-firefox
gfx.webrender.all = true media.ffmpeg.vaapi.enabled = true media.navigator.mediadatadecoder_vpx_enabled = true media.ffvpx.enabled = false media.rdd-vpx.enabled = false
-
Disable Pocket
extensions.pocket.enabled = false
-
Disable
gnome-extensions disable [email protected]
-
Install
-
with
busctl:busctl --user call org.gnome.Shell \ /org/gnome/Shell \ org.gnome.Shell.Extensions \ InstallRemoteExtension s \ "[email protected]" -
with
gdbus:gdbus call --session \ --dest org.gnome.Shell.Extensions \ --object-path /org/gnome/Shell/Extensions \ --method org.gnome.Shell.Extensions.InstallRemoteExtension \ "[email protected]"
-
-
Update
-
with
busctl:busctl --user call org.gnome.Shell \ /org/gnome/Shell \ org.gnome.Shell.Extensions \ CheckForUpdates -
with
gdbus:gdbus call --session \ --dest org.gnome.Shell.Extensions \ --object-path /org/gnome/Shell/Extensions \ --method org.gnome.Shell.Extensions.CheckForUpdates
-
gsettings set org.gnome.nautilus.preferences open-folder-on-dnd-hover falsehttps://www.omgubuntu.co.uk/2023/02/ubuntu-open-folder-on-drag-drop-hover
ffmpegthumnailer (layer rpm-fusion first)
rpm-ostree override remove \
ffmpeg-free \
libavcodec-free \
libavdevice-free \
libavfilter-free \
libavformat-free \
libavutil-free \
libpostproc-free \
libswresample-free \
libswscale-free \
--install \
ffmpegthumbnailer `# this is for nautilus video thumbnails`~/.local/share/org.gnome.Ptyxis/palettes/elementaryOS.palette
[Palette]
Name=elementaryOS
Primary=true
[Light]
Background=#FDF6E3
Foreground=#586e75
Cursor=#839496
Color0=#073642
Color1=#dc322f
Color2=#859900
Color3=#b58900
Color4=#268bd2
Color5=#d33682
Color6=#2aa198
Color7=#eee8d5
Color8=#002b36
Color9=#dc322f
Color10=#586e75
Color11=#657b83
Color12=#839496
Color13=#6c71c4
Color14=#93a1a1
Color15=#fdf6e3
[Dark]
Background=#2E2E2E
Foreground=#a5a5a5
Cursor=#839496
Color0=#073642
Color1=#dc322f
Color2=#859900
Color3=#b58900
Color4=#268bd2
Color5=#d33682
Color6=#2aa198
Color7=#eee8d5
Color8=#5e5c64
Color9=#dc322f
Color10=#586e75
Color11=#657b83
Color12=#839496
Color13=#6c71c4
Color14=#93a1a1
Color15=#fdf6e3create profile and set as default.
- visible-name:
elementaryOS - default-size-columns:
120 - default-size-rows:
30 - use-system-font:
false - font:
'Monospace 11' - scrollback-unlimited:
true - use-theme-colors:
false
UUID_NEW=$(uuidgen); \
UUID_LIST=$(gsettings get org.gnome.Ptyxis profile-uuids); \
dconf load / <<EOF
[org/gnome/Ptyxis]
audible-bell=false
default-columns=uint32 120
default-profile-uuid='$UUID_NEW'
default-rows=uint32 30
font-name='Monospace 11'
profile-uuids=${UUID_LIST%%]}, '$UUID_NEW']
restore-window-size=false
use-system-font=false
window-size=(uint32 120, uint32 30)
[org/gnome/Ptyxis/Profiles/$UUID_NEW]
label='elementaryOS'
limit-scrollback=false
login-shell=false
palette='elementaryOS'
EOFmkdir ~/.config/gtk-4.0
cat <<EOF > ~/.config/gtk-4.0/gtk.css
vte-terminal,
terminal-window {
/* up right bottom left */
padding: 10px 15px 15px 10px;
}
EOF-
Disable
CoWon image directoryhttps://www.jwillikers.com/gnome-boxes-on-btrfs
https://wiki.archlinux.org/title/Btrfs#Disabling_CoW
-
Flatpak:
chattr +C ~/.var/app/org.gnome.Boxes/data/gnome-boxes/images -
System package:
chattr +C ~/.local/share/gnome-boxes/images
-
Preferences > Miscellaneous > Extra mpv options
# not suggested by manual: --vo=gpu --hwdec=vaapi --gpu-context=wayland
# suggested way is:
--hwdec=auto-safe --gpu-context=waylandhttps://stackoverflow.com/a/70345376/11391913
https://git-scm.com/docs/git-config#Documentation/git-config.txt-GITCONFIGGLOBAL
touch $HOME/.config/gitconfig $HOME/.config/gitignore
export GIT_CONFIG_GLOBAL=$HOME/.config/gitconfig
git config --global core.excludesFile '~/.config/gitignore'
git config --global user.name "username"
git config --global user.email [email protected]https://coreos.github.io/rpm-ostree/ex-rebuild/#declarative-system-changes
mkdir -p /etc/rpm-ostree/origin.d
tee /etc/rpm-ostree/origin.d/layers_n_overrides.yaml <<EOF
packages:
- thinkfan
override-remove:
- gnome-tour
- firefox
- firefox-langpacks
- fedora-workstation-repositories
- gnome-classic-session
EOF
rpm-ostree ex rebuildmkdir -p /etc/rpm-ostree/origin.d
tee /etc/rpm-ostree/origin.d/ffmpegthumbnailer.yaml <<EOF
# remove ffmpeg-free packages in the base image for ffmpegthumbnailer
packages:
- ffmpegthumbnailer
override-remove:
- ffmpeg-free
- libavcodec-free
- libavdevice-free
- libavfilter-free
- libavformat-free
- libavutil-free
- libpostproc-free
- libswresample-free
- libswscale-free
EOF
rpm-ostree ex rebuildmkdir -p /etc/rpm-ostree/origin.d
tee /etc/rpm-ostree/origin.d/intel-media-driver.yaml <<EOF
packages:
- intel-media-driver
override-remove:
- mesa-va-drivers
EOF
rpm-ostree ex rebuild