# fedora-niri-dms An installer script that turns a minimal, terminal-only Fedora install into a complete [niri](https://github.com/niri-wm/niri) + [DankMaterialShell](https://danklinux.com) desktop, with the DMS login screen. ## Quick start 1. Install Fedora from the **Everything** netinstall ISO and choose **Fedora Custom Operating System** under Software Selection. Create a user with administrative privileges. 2. Boot to the text login, sign in, and run: ```bash curl -fsSL https://gitea.schantli.ca/jschantli/fedora-niri-dms/raw/branch/main/fedora-niri-dms-setup.sh -o setup.sh bash setup.sh ``` Run it as your **normal user**, not root. It uses `sudo` when it needs to. 3. Answer the optional questions at the start. The rest runs unattended. 4. Reboot, pick the **niri** session at the login screen, and sign in. Press **Super+Shift+/** after logging in to see every keybind. ## What it installs | Area | Packages / changes | | --- | --- | | dnf | Parallel downloads, `dnf5-plugins`, full system update | | Repos | RPM Fusion (free + non-free), Cisco OpenH264, `avengemedia/dms` COPR | | Graphics | Mesa + Vulkan, plus VA-API drivers for AMD, Intel or NVIDIA (auto-detected) | | Codecs | Full `ffmpeg` and the multimedia group | | Audio | PipeWire, WirePlumber, SOF firmware | | Hardware | Bluetooth, `tuned-ppd` power profiles, `fwupd` firmware updates | | Desktop | niri, DankMaterialShell, `xwayland-satellite` | | niri config | Waybar autostart disabled; DMS keybinds and Ptyxis added through an included `dms-setup.kdl` | | Snapshots | snapper + Btrfs Assistant, with a before/after snapshot around every dnf transaction | | Removed | Waybar, mako, fuzzel, swaybg, swayidle, swaylock, Alacritty (DMS replaces them) | | Login screen | DMS greeter (greetd), graphical boot target | | Essentials | Ptyxis, Nautilus, Firefox, desktop portals, GNOME Keyring, Noto fonts, Flatpak + Flathub, fastfetch | | Shell | zsh (set as default) with autosuggestions and syntax highlighting, Starship prompt, eza, bat, fzf, zoxide, JetBrains Mono Nerd Font | ### Shell shortcuts | Type | Does | | --- | --- | | → (right arrow) | Accepts the grey autosuggestion | | Tab | Menu-style completion | | Up / Down | Searches history for what you've typed so far | | Ctrl+R / Ctrl+T | Fuzzy-search history / files (fzf) | | `z ` | Jumps to your most-used matching folder | | `ls`, `ll`, `la`, `tree` | Colourful listings with icons and git status (eza) | | `cat` | Syntax-highlighted output (bat) | Your own zsh additions go in `~/.zshrc.local`. The script owns `~/.zshrc` and overwrites it on re-runs; any `~/.zshrc` that was already there is backed up to `~/.zshrc.bak` first. ### Optional (asked at the start) - Steam and gamescope - NetworkManager OpenVPN support (for PIA or other `.ovpn` configs) - Fingerprint reader setup (Framework laptops) - EasyEffects (for Framework's speaker profile) ## Keybinds added These live in `~/.config/niri/dms-setup.kdl`, included at the end of `config.kdl` so they override niri's defaults. To change one, add your own bind in `config.kdl` **after** the `include` line; the script overwrites `dms-setup.kdl` on re-runs. | Keys | Does | | --- | --- | | Super+T | Ptyxis | | Super+D | DMS app launcher | | Super+Alt+L | Lock screen | | Super+Alt+V | Clipboard history | | Super+Alt+N | Notifications | | Super+Alt+C | Control centre | | Super+Alt+S | DMS settings | ## Snapshots and rollback On a Btrfs install (Fedora's default), the script sets up snapper: - Every `dnf` install, update or removal takes a **pre** and **post** snapshot of the root filesystem. - The finished setup is saved as an "important" snapshot called `fedora-niri-dms-setup baseline`. - The 10 newest snapshot pairs are kept and older ones are cleaned up automatically. To undo a bad update, open **Btrfs Assistant** → Snapper, pick the snapshot from before the update, and restore it. From a terminal, `snapper -c root list` shows them all. Snapshots cover `dnf` only. Flatpak updates aren't captured, and booting straight into a snapshot from GRUB would need `grub-btrfs`, which isn't in Fedora's repos. ## Requirements - Fedora 43 or newer, installed as **Fedora Custom Operating System** - An internet connection - A GPU with working acceleration ### Testing in a VM niri needs 3D acceleration, or you'll get a black screen after reboot. Turn it on before rebooting: - **Proxmox:** Display → VirGL GPU (host needs `apt install libgl1 libegl1`) - **virt-manager / GNOME Boxes:** Virtio video with 3D acceleration, Spice with OpenGL - **VirtualBox:** VMSVGA with Enable 3D Acceleration - **VMware:** Accelerate 3D graphics ## Troubleshooting | Problem | Fix | | --- | --- | | Black screen after reboot | Ctrl+Alt+F2, log in, then run `niri-session` or `dms greeter status` | | DMS bar doesn't appear | Run `dms run` to see the error; check `systemctl --user status dms` | | No sound | `systemctl --user status pipewire wireplumber`, then `wpctl status` | | Screen sharing shows nothing | Check `xdg-desktop-portal-gnome` is installed, then log out and back in | | Keyring asks for a password every login | `sudo authselect enable-feature with-pam-gnome-keyring` and reboot | ## Notes - The script is safe to re-run; each step checks before changing anything. - **Steam menu fix:** xwayland-satellite 0.8.2 and older make X11 popup menus (like Steam's) flicker and vanish. If Fedora's package is affected, the script builds the fixed upstream commit (`add2795`) into `/usr/local/bin`. A boot-time check (`xwls-git-check.service`) deletes that build, and then itself, once Fedora ships a newer version. - Your original niri config is saved as `~/.config/niri/config.kdl.orig` before it's edited. - No HDR yet: niri doesn't support it. HDR gaming needs a separate gamescope session. - DMS comes from the stable `avengemedia/dms` COPR, not the faster-moving `dms-git`. ## Development Every push and pull request runs `.gitea/workflows/shellcheck.yml`, which syntax-checks and ShellChecks every `.sh` file in the repo. It needs Actions enabled on the repo (Settings → Repository → Enable Repository Actions) and an `act_runner` registered with the `ubuntu-latest` label. ``` fedora-niri-dms/ ├── fedora-niri-dms-setup.sh ├── README.md ├── LICENSE └── .gitea/ └── workflows/ └── shellcheck.yml ``` ## License MIT