# XDG base dirs, the user folders and default applications. # Documents, Downloads, Music, Pictures and Videos are separate subvolumes on # the data SSD mounted into $HOME (modules/hosts/desktop/disks.nix); Desktop, # Templates and Public are plain directories on the system disk. Home-manager's # default folder names already match, so only the unwanted ones are changed. let firefox = "firefox.desktop"; fileManager = "Dolphin.desktop"; imageViewer = "org.gnome.Loupe.desktop"; mediaPlayer = "mpv.desktop"; pdfViewer = "org.pwmt.zathura.desktop"; archiveManager = "org.gnome.FileRoller.desktop"; in { flake.modules.homeManager.xdg = { xdg = { enable = true; userDirs = { enable = true; createDirectories = true; # No ~/Projects: code lives wherever the user clones it. projects = null; }; mimeApps = { enable = true; defaultApplications = { "text/html" = firefox; "x-scheme-handler/http" = firefox; "x-scheme-handler/https" = firefox; "x-scheme-handler/about" = firefox; "x-scheme-handler/unknown" = firefox; "inode/directory" = fileManager; "image/*" = imageViewer; "video/*" = mediaPlayer; "audio/*" = mediaPlayer; "application/pdf" = pdfViewer; "application/zip" = archiveManager; "application/x-tar" = archiveManager; "application/x-7z-compressed" = archiveManager; "application/vnd.rar" = archiveManager; }; }; # "Open in terminal" actions (desktop entries with Terminal=true) use WezTerm. terminal-exec = { enable = true; settings.default = [ "org.wezfurlong.wezterm.desktop" ]; }; }; }; }