WIP: home-manager modules and install tooling (in progress, unreviewed)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J1cugeLkfFLZMpiztQ8TyN
This commit is contained in:
30 files changed
+2619
No files matched your search
@@ -0,0 +1,67 @@
|
||||
# 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 (my.disks); 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.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.home.xdg;
|
||||
|
||||
firefox = "firefox.desktop";
|
||||
fileManager = "org.gnome.Nautilus.desktop";
|
||||
imageViewer = "org.gnome.Loupe.desktop";
|
||||
mediaPlayer = "mpv.desktop";
|
||||
pdfViewer = "org.pwmt.zathura.desktop";
|
||||
archiveManager = "org.gnome.FileRoller.desktop";
|
||||
in
|
||||
{
|
||||
options.my.home.xdg.enable = lib.mkEnableOption "XDG directories and default applications";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
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" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user