flocon/modules/programs/xdg.nix
Anthony Rodriguez fc876b2ea5
treewide: update options API
The options API has been updated, in order for a more flexible setup
with `local.modules.desktop.enable` being replaced with an enum of
desktops at `local.systemVars.desktop`, which allows for switching
desktop environments by changing a single option. This is so that we can
switch to cosmic and only enable the programs we need (i.e. disable
greetd because we use cosmic-greeter and enable terminals since that is
desktop related). This is simpler than having a different module per
desktop.
2025-02-06 18:47:01 +01:00

46 lines
1.4 KiB
Nix

{
lib,
pkgs,
config,
...
}: let
inherit (config.local.systemVars) username;
in {
config = lib.mkIf (config.local.systemVars.desktop != "none") {
hjem.users.${username} = {
files = {
".config/mimeapps.list".text = ''
[Default Applications]
application/pdf=org.pwmt.zathura-pdf-mupdf.desktop
default-web-browser=firefox.desktop
image/gif= org.gnome.gThumb.desktop
image/jpeg=org.gnome.gThumb.desktop
image/png=org.gnome.gThumb.desktop
image/svg= org.gnome.gThumb.desktop
inode/directory=thunar.desktop
text/html=firefox.desktop
video/avi=io.github.celluloid_player.Celluloid.desktop
video/mkv=io.github.celluloid_player.Celluloid.desktop
video/mp4=io.github.celluloid_player.Celluloid.desktop
x-scheme-handler/about=firefox.desktop
x-scheme-handler/chrome=chromium-browser.desktop
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
x-scheme-handler/unknown=firefox.desktop
'';
};
};
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
config = {
common.default = ["gtk"];
hyprland.default = ["gtk" "hyprland"];
};
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
};
};
}