flocon/modules/programs/xdg.nix
Anthony Rodriguez 6ab835555c
treewide: remove home-manager (switch to hjem)
As my NixOS configuration kept growing, I noticed that I don't need
home-manager as much as I did before. A lot of what I need is just a way
to map nix attrsets to the program's respective configuration format,
which is something that I can now do myself, as my nix knowledge got
more extensive. After all of this, I decided to completely get rid of
home-manager, and switch to a simpler solution called hjem, which just
lets me write files to my home directory that are automatically
symlinked using `systemd-tmpfiles`.

This allows me to simplify my configuration, remove the separation
between NixOS and home-manager modules, and cut my eval times by quite a
lot (which allows for faster `nixos-rebuild switch`!).
2025-01-27 23:57:47 +01:00

46 lines
1.3 KiB
Nix

{
lib,
pkgs,
config,
...
}: let
inherit (config.local.systemVars) username;
in {
config = lib.mkIf config.local.profiles.desktop.enable {
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=yazi.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
];
};
};
}