dotfiles
Apps

Apps and MIME associations

Edit on GitHub

modules/home/apps/media.nix, office.nix, mangohud.nix, openal.nix.

home-manager merges defaultApplications from EVERY module into a single mimeapps.list, so these modules each declare only their own types and the result composes. modules/home/desktop/xdg.nix holds the browser plus text/code, and modules/home/apps/curseforge.nix holds the URL schemes.

Media: Gwenview plus Papers

Gwenview (images) because this system is already Qt/Kvantum plus Dolphin, so it comes in themed for free and integrates with the file manager (open-with, thumbnails).

Documents left Okular for a more modern look. Papers (GNOME's GTK4/libadwaita reader) is the ONE reader, for PDF and CBZ: Stylix already recolors libadwaita, so it follows the palette with no extra config. It is built with supportNautilus = false, since its Nautilus extension pulled in Nautilus, gnome-user-share and apache-httpd on a Dolphin desktop. Papers does not open EPUB, and no EPUB default is declared, so OnlyOffice takes it (see the trap below). Readest (Tauri + Next.js) was tried as a second reader for EPUB and dropped: one reader on the machine, not two. JoPDF was considered and rejected: it is proprietary, from an unidentified vendor, ships only as a .deb and is not in nixpkgs. kimageformats plus qtimageformats give the modern formats (AVIF/HEIF/JXL/WebP/RAW/PSD).

mpv is configured through its programs.* module, so it stays idiomatic: hwdec = "auto-safe" decodes on the GPU when that is safe, and vo = "gpu-next" is the modern output, with better HDR/tone-mapping on Wayland. VLC is the association default; mpv is left for opening by hand or from the CLI.

ALWAYS use shared-mime-info's CANONICAL type

An ALIAS does not match in the lookup and the entry dies in silence. Three cases hit here:

Wrong (alias)Right (canonical)What broke
image/heicimage/heif.heic never reached Gwenview
image/x-psdimage/vnd.adobe.photoshopGwenview's own .desktop declares only the alias
video/x-msvideovideo/vnd.avi.avi fell into mpv instead of VLC

Two more that are easy to miss: image/vnd.microsoft.icon (.ico) is read natively by Qt but is not declared in Gwenview's .desktop, and the AUDIO types all have to be listed explicitly, because otherwise mpv.desktop takes the association by claiming them in its own .desktop, against the intent.

Office: why OnlyOffice and not LibreOffice

OnlyOffice uses OOXML as its NATIVE format, so .docx/.xlsx/.pptx open with no shifted table and no repagination, and the UI is a ribbon, just like Office 365.

LibreOffice is the NixOS community's default and has more features (Draw, Base, macros), but it is native in ODF and CONVERTS OOXML, losing fidelity on a complex document. Switching is 1 line plus the defaults.

The fonts come from modules/nixos/desktop/fonts.nix (corefonts plus vista-fonts). The package is a buildFHSEnv and /etc/fonts comes from the HOST (build-fhsenv-bubblewrap), so the system's fontconfig already sees them. There is NO need for the "copy the .ttf into ~/.local/share/fonts" that the NixOS wiki tells you to do by hand (rule 3). See fonts.md.

A trap: OnlyOffice's .desktop claims 61 mimetypes, pdf, epub, text/plain, markdown and csv included. The explicit defaults in media.nix (Papers) and xdg.nix (VS Code) still win, but if they ever disappear, OnlyOffice starts opening PDFs and .txt files.

OpenAL: the mute-game fix

xdg.configFile."alsoft.conf" forces the PulseAudio backend. It is read by ANY OpenAL-soft, the one bundled with a game included.

Without it, the OpenAL 1.18.2 that ships with the HashLink/Heaps games (Northgard, Dead Cells, Evoland) has no pipewire backend, since that only arrived in 1.20+, and inside the Steam runtime's sandbox it falls into the wrong ALSA device and goes MUTE. pulse connects to the pipewire-pulse socket, so sound comes out on the default sink.

MangoHud

The config is 100% declared, generating ~/.config/MangoHud/MangoHud.conf. The INJECTION into the game comes from the bottle's mangohud: true toggle in Bottles; this module only CONFIGURES the overlay that one injects. Since the bottle maps $HOME, the overlay reads this conf normally. The show/hide toggle is Shift(right)+F12.

Caveats of the xe driver on the Arc B580: gpu_power will probably be EMPTY, because the card exposes no INSTANTANEOUS power through hwmon, only the energy counters (energy1_input, energy2_input) and the cap. A reader that wants watts has to derive them from two energy readings, which is what the bar does and MangoHud does not. gpu_fan is a different case and an older claim here was wrong: fan1_input does exist and the bar reads it, so the figure should appear, reading zero whenever the card is in its zero RPM idle. gpu_mem_temp is fine, the sensor exists. The ones left on break nothing either way.

cpu_power does work here, through RAPL on the i5-11400.