Misc: update packages & apps, ROCm, SSH, ...

Framework LED Matrix, over amplication, Mac fnmode for Fedora, OBS CQ,
Python config for Helix and yapf3
This commit is contained in:
DuckDuckWhale 2024-09-06 11:30:14 -07:00
parent 9736e73c8e
commit 8d214518ff
Signed by: DuckDuckWhale
GPG Key ID: E4B9FC170FFD71CE
8 changed files with 101 additions and 16 deletions

View File

@ -32,6 +32,10 @@ cd clang-format
./clang-format
cd ..
cd yapf
./yapf
cd ..
cd home-chmod
./home-chmod
cd ..

5
auto/yapf/style Normal file
View File

@ -0,0 +1,5 @@
[style]
use_tabs = true
column_limit = 100
continuation_align_style = fixed
continuation_indent_width = 1

3
auto/yapf/yapf Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh -e
mkdir -p ~/.config/yapf
mv -i style ~/.config/yapf/

View File

@ -104,4 +104,13 @@ language-servers = [ "ltex-ls" ]
file-types = ["md"]
scope = "source.markdown"
roots = []
[[language]]
name = "python"
indent = { tab-width = 4, unit = "\t" }
formatter = { command = "yapf3" }
auto-format = true
[language-server.pylsp.config.pylsp.plugins]
pycodestyle.enabled = false
EOF

View File

@ -1,9 +1,14 @@
# Fedora 39 Installation
# Fedora Installation
Here is how I installed Fedora 39. I chose to migrate from ext4 to btrfs, the
Here is how I installed Fedora. I chose to migrate from ext4 to btrfs, the
default file system for Fedora. I also bought a new disk, which means that I
needed to create everything from scratch.
_Note: This document details the installation only. For setup, see
[Fedora System Setup](fedora-system-setup.md) or
[Fedora User Setup](fedora-user-setup.md). This is originally written
for Fedora 39 and updated to Fedora 40._
By following these steps, you will be able to install Fedora with:
- `/` as a btrfs subvolume using xxhash as the checksum function on LUKS2 (an
encryption layer)

View File

@ -1,10 +1,11 @@
# Fedora 39 System Setup
# Fedora System Setup
Congratulations on your new install! Now, let's set the system up.
_Note: this document details the system level setup only. For user level setup
_Note: This document details the system level setup only. For user level setup
that is remembered in the user home directories, see
[Fedora 39 User Setup](fedora-user-setup.md)._
[Fedora User Setup](fedora-user-setup.md). This is originally written for
Fedora 39 and updated to Fedora 40._
Rename your system in `Settings` -> `About`.
@ -22,12 +23,20 @@ wl-clipboard qrencode xournalpp gstreamer1-plugins-bad-free-extras
gnome-extensions-app gnome-shell-extension-gsconnect nautilus-gsconnect
kernel-tools mozilla-openh264 gstreamer1-plugin-openh264 trash-cli ripgrep
gnome-tweaks goldendict-ng gcc-c++ gimp alacritty clang clang-tools-extra bat
quearcode qpdf lm_sensors kdenlive`
helix fish kdiskmark kiwix-desktop`
### As needed
`dnf install gnome-usage install rlwrap mediainfo nmap xeyes progress
duperemove memtest86+`
duperemove memtest86+ lm_sensors efitools quearcode qpdf kdenlive stress`
## AMD
```
sudo dnf install rocminfo rocm-smi
sudo usermod -a -G render,video $(whoami)
````
Then relog.
## Flathub apps
@ -45,7 +54,7 @@ can clear the app data.
- Resources
- `flatpak install flathub net.nokyan.Resources`
- Use Wayland and disable X11 and its fallback
- Remove `host:ro` (sus)
- Remove `filesystem=host` (sus)
- Video Trimmer
- `flatpak install flathub org.gnome.gitlab.YaLTeR.VideoTrimmer`
- Use Wayland and disable X11 and its fallback
@ -53,20 +62,44 @@ can clear the app data.
- `flatpak install flathub com.usebottles.bottles`
- Signal
- `flatpak install flathub org.signal.Signal`
- Use Wayland: `SIGNAL_USE_WAYLAND=1` and disable X11 permissions.
- Use Wayland: `SIGNAL_USE_WAYLAND=1` and disable X11 and its fallback.
- Disable `filesystem=host`. Not sure why it would ever be a good idea.
[PR that enabled this by default
](https://github.com/flathub/org.signal.Signal/pull/766) mentioned that
"Electron broke portals" and some default settings "will never satisfy
everyone", but that does not convince me.
- Disable `org.freedesktop.login1`. Not sure why it's needed.
If you know why, please let me know!
- Turn on notifications
- Speech Note
- `flatpak install net.mkiol.SpeechNote`
- `flatpak install net.mkiol.SpeechNote.Addon.amd`
- Disable X11 and fallback
- Remove:
- `xdg-documents`
- `xdg-videos`
- `xdg-music`
- `xdg-desktop`
- `xdg-download`
- Cameractrls
- `flatpak install flathub hu.irl.cameractrls`
- Disable X11 and fallback
- Denaro
- `flatpak install flathub org.nickvision.money`
- Disable X11 and fallback
- Ungoogled Chromium
- `flatpak install flathub io.github.ungoogled_software.ungoogled_chromium`
- Disable smart cards, printing system, all user files
- Enable GPU acceleration
- Remove Other files: `/run/.heim_org.h5l.kcm-socket`
- Minecraft (Prism Launcher)
- `flatpak install flathub org.prismlauncher.PrismLauncher`
- Remove `xdg-download:ro`
- Remove `~/.ftba:ro`
- Remove `xdg-run/app/com.discordapp.Discord:create`
- Remove `/sys/kernel/mm/transparent_hugepage:ro`
- Remove `/sys/kernel/mm/hugepages:ro`
- Remove `xdg-config/kdeglobals:ro`
- Steam
- `flatpak install flathub com.valvesoftware.Steam`
- Remove `xdg-run/app/com.discordapp.Discord:create`
@ -84,16 +117,24 @@ can clear the app data.
- Discord
- `flatpak install flathub com.discordapp.Discord`
- Remove `xdg-pictures:ro`, `xdg-videos:ro`
- Allow background and notifications
- Zoom
- `flatpak install flathub us.zoom.Zoom`
- WeChat
- `flatpak install flathub com.tencent.WeChat`
- Remove "Owns: `org.kde.*`"
- Remove `xdg-download:ro`; why do you need to read it? Isn't write what
you are after?
## SSH
In `Settings` -> `Sharing`: turn on `Remote Login` and edit
`/etc/ssh/sshd_config` according to `system/sshd/sshd_config-rhel`.
In `System` -> `Secure Shell`: turn on `Secure Shell` and edit
`/etc/ssh/sshd_config` according to `system/sshd/sshd_config-rhel`, or if you
are lazy:
```
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
sudo cp ../system/sshd/sshd_config-rhel /etc/ssh/sshd_config
```
`sudoedit /etc/ssh/sshd_config.d/00-no-gss.conf` and write
`GSSAPIAuthentication no` to override `/etc/ssh/sshd_config.d/50-redhat.conf`,
@ -107,7 +148,17 @@ sudo usermod -aG ssh-users $(whoami)
```
Finally, log out then log in again for the `usermod` to take effect.
If you see a permission denied from sshd in your logs, use
If you have just came from a non-SELinux distro (say the Debian family) and see
a permission denied message from `sshd` in your logs, use
`restorecon -RFv ~/.ssh` to please SELinux.
(Don't forget to install Mosh!)
## Framework 16
Put the following into `/etc/udev/rules.d/50-framework-inputmodule.rules`:
```
# Framework Laptop 16 - LED Matrix
SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0020", MODE="0660", TAG+="uaccess"
```
Then run `sudo udevadm control --reload && sudo udevadm trigger`

View File

@ -3,10 +3,11 @@
Now that you have setup your new system, time to configure quality-of-life user
settings!
_Note: this document details the user level setup only. This means settings
_Note: This document details the user level setup only. This means settings
that you may make without superuser permission and are remembered in the home
directory. For system level setup, see
[Fedora 39 System Setup](fedora-system-setup.md)._
[Fedora 39 System Setup](fedora-system-setup.md). This is originally written
for Fedora 39 and updated to Fedora 40._
## Default apps
@ -81,7 +82,7 @@ Reset SELinux labels:
- Xournal++: turn on dark mode
- OBS: 2560x1440,
[mkv](https://en.wikipedia.org/wiki/Comparison_of_video_container_formats),
VAAPI AV1 (CQ 28), opus, output to `~/Videos/OBS/`
VAAPI AV1 (CQ 20), opus, output to `~/Videos/OBS/`
- Install [per application audio capture](https://github.com/dimtpap/obs-pipewire-audio-capture/releases/tag/1.1.4).
To install the plugin: open OBS folder from its menu, decompress the zip and
remove the outer folder and put in the `plugins` folder, creating it if it
@ -91,3 +92,8 @@ Reset SELinux labels:
[obs CLI for obs-websocket v5](https://github.com/grigio/obs-cmd) to
emulate global shortcuts on Wayland
- Enable replay buffer of 60 seconds and 1000 MB
## Tricks
Over amplification is nowhere to be found on recent GNOME Tweaks:
`gsettings set org.gnome.desktop.sound allow-volume-above-100-percent 'true'`

View File

@ -0,0 +1,2 @@
#!/bin/sh
echo options hid_apple fnmode=2 | sudo tee -a /etc/modprobe.d/hid_apple.conf