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>
This commit is contained in:
Bernardo Magri
2026-06-13 14:32:11 +01:00
parent d06373b155
commit 76582c1ee9
8 changed files with 180 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ let
cfg = config.nomarchy.system;
in
{
imports = [ ./options.nix ./plymouth.nix ];
imports = [ ./options.nix ./plymouth.nix ./file-manager.nix ];
config = {
# The safe half of distro branding: distroName flows into

View File

@@ -0,0 +1,35 @@
# 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
];
};
}

View File

@@ -37,6 +37,12 @@
'';
};
fileManager.enable = lib.mkEnableOption ''
the Thunar GUI file manager + backend services (gvfs/tumbler/udisks2)
for point-and-click file management and the "open folder" handler.
The keyboard-driven TUI flagship (yazi) is the nomarchy.yazi.* home
option'' // { default = true; };
audio.enable = lib.mkEnableOption "the Pipewire audio stack" // { default = true; };
bluetooth.enable = lib.mkEnableOption "Bluetooth support with blueman" // { default = true; };