Files
Nomarchy/modules/nixos/file-manager.nix
Bernardo Magri 76582c1ee9 feat: file manager — yazi (flagship TUI) + Thunar (GUI)
Legacy shipped only Thunar (and a stray nautilus extension, mid-migration).
This pairs a keyboard-driven TUI flagship that fits the distro's identity
with the GUI half for point-and-click + the "open folder" handler.

yazi (modules/home/yazi.nix, nomarchy.yazi.enable, SUPER+E, `y` shell
wrapper cd's on exit): themed from theme-state.json (mgr/mode/status
mapped from the palette; merges over yazi's defaults so it tracks the
theme) with a curated, correctly-wired plugin set —
  full-border, git (setup + prepend_fetchers), smart-enter (l/Enter),
  chmod (cm), mount (M), compress (caa), mediainfo (audio/subtitle only —
  images/videos keep native thumbnails), glow (markdown previews).
Preview/tooling deps: ffmpegthumbnailer, poppler-utils, p7zip, jq, fd,
ripgrep, fzf, chafa, mediainfo, glow.

Thunar (modules/nixos/file-manager.nix, nomarchy.system.fileManager.enable):
GTK file manager (Stylix-themed) + archive/volman/media-tags plugins +
gvfs/tumbler/udisks2 backends + thumbnailers + exo. udisks2 also backs
yazi's mount plugin.

Verified: flake check green, HM generation builds (yazi TOML/init.lua
render, all 8 plugins resolve), every package present in the live ISO
closure (offline install draws from it — no source-build leak).
Not verified: yazi's runtime preview/plugin behaviour needs a real
session (TUI; can't drive in CI here).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 14:32:11 +01:00

36 lines
1.4 KiB
Nix

# GUI file manager — Thunar (lightweight GTK, Stylix-themed) plus the
# backend services a standalone compositor needs for it to work fully:
# gvfs (trash/mount/network), tumbler (thumbnails), udisks2 (removable
# media — also what yazi's mount plugin drives). The keyboard-driven TUI
# flagship is yazi (modules/home/yazi.nix); this is the point-and-click
# half and the XDG handler for "open folder" / "show in files".
{ config, lib, pkgs, ... }:
let
cfg = config.nomarchy.system;
in
{
config = lib.mkIf cfg.fileManager.enable {
programs.thunar = {
enable = lib.mkDefault true;
plugins = with pkgs.xfce; [
thunar-archive-plugin # create/extract archives from the context menu
thunar-volman # auto-manage removable drives/media
thunar-media-tags-plugin # rename/inspect audio by tags
];
};
services.gvfs.enable = lib.mkDefault true; # trash, mounts, network shares
services.tumbler.enable = lib.mkDefault true; # thumbnail generation
services.udisks2.enable = lib.mkDefault true; # mount/unmount removable media
environment.systemPackages = with pkgs; [
ffmpegthumbnailer # video thumbnails (Thunar + yazi)
libgsf # ODF thumbnails
poppler-utils # PDF thumbnails / pdftoppm (yazi PDF preview too)
xfce.exo # "Open Terminal Here" and default-app associations
shared-mime-info # MIME database
];
};
}