2024-11-15 21:55:58 -08:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
2024-11-21 20:28:46 -08:00
|
|
|
system,
|
2024-11-15 21:55:58 -08:00
|
|
|
pkgs,
|
|
|
|
...
|
2025-01-13 21:05:10 -08:00
|
|
|
}: let
|
2024-11-21 20:28:46 -08:00
|
|
|
inherit (lib.snowfall.system) is-linux;
|
|
|
|
|
2024-11-16 22:34:40 -08:00
|
|
|
inherit (config.marleyos) isDesktop;
|
2025-01-13 21:05:10 -08:00
|
|
|
in {
|
2024-11-15 21:55:58 -08:00
|
|
|
config = {
|
|
|
|
home.preferXdgDirectories = true;
|
|
|
|
|
2025-01-13 21:05:10 -08:00
|
|
|
xdg = let
|
|
|
|
homeDir = config.home.homeDirectory;
|
|
|
|
in
|
|
|
|
lib.mkMerge [
|
2024-11-15 21:55:58 -08:00
|
|
|
{
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
cacheHome = "${homeDir}/.cache";
|
|
|
|
configHome = "${homeDir}/.config";
|
|
|
|
dataHome = "${homeDir}/.local/share";
|
|
|
|
stateHome = "${homeDir}/.local/state";
|
|
|
|
}
|
2024-11-21 20:28:46 -08:00
|
|
|
|
2025-01-13 21:05:10 -08:00
|
|
|
(lib.mkIf (isDesktop && (is-linux system)) {
|
2024-11-15 21:55:58 -08:00
|
|
|
userDirs = {
|
|
|
|
enable = true;
|
|
|
|
createDirectories = true;
|
|
|
|
|
|
|
|
desktop = "${homeDir}/desktop";
|
|
|
|
documents = null;
|
|
|
|
download = "${homeDir}/downloads";
|
|
|
|
music = null;
|
|
|
|
pictures = "${homeDir}/pictures";
|
|
|
|
templates = null;
|
|
|
|
videos = "${homeDir}/videos";
|
|
|
|
};
|
|
|
|
|
|
|
|
portal = {
|
|
|
|
enable = true;
|
|
|
|
xdgOpenUsePortal = true;
|
2025-01-13 21:05:10 -08:00
|
|
|
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
|
|
|
config.common.default = ["gtk"];
|
2024-11-15 21:55:58 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
mimeApps = rec {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
associations.added = {
|
2025-01-13 21:05:10 -08:00
|
|
|
"application/json" = ["nvim.desktop"];
|
|
|
|
"application/pdf" = ["org.pwmt.zathura-pdf-mupdf.desktop"];
|
|
|
|
"application/xhtml+xml" = ["zen-alpha.desktop"];
|
|
|
|
"application/x-extension-htm" = ["zen-alpha.desktop"];
|
|
|
|
"application/x-extension-html" = ["zen-alpha.desktop"];
|
|
|
|
"application/x-extension-shtml" = ["zen-alpha.desktop"];
|
|
|
|
"application/x-extension-xhtml" = ["zen-alpha.desktop"];
|
|
|
|
"application/x-extension-xht" = ["zen-alpha.desktop"];
|
|
|
|
"image/png" = ["feh.desktop"];
|
|
|
|
"text/html" = ["zen-alpha.desktop"];
|
|
|
|
"text/plain" = ["nvim.desktop"];
|
|
|
|
"x-scheme-handler/chrome" = ["zen-alpha.desktop"];
|
|
|
|
"x-scheme-handler/http" = ["zen-alpha.desktop"];
|
|
|
|
"x-scheme-handler/https" = ["zen-alpha.desktop"];
|
2024-11-15 21:55:58 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
defaultApplications = associations.added;
|
|
|
|
};
|
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|