30 lines
708 B
Nix
30 lines
708 B
Nix
{ pkgs, ... }:
|
|
|
|
let
|
|
portals-config = pkgs.writeTextDir "share/xdg-desktop-portal/portals/portals.conf" ''
|
|
[preferred]
|
|
default=hyprland
|
|
org.freedesktop.impl.portal.Settings=darkman
|
|
'';
|
|
packages = [
|
|
pkgs.xdg-desktop-portal
|
|
pkgs.xdg-desktop-portal-hyprland
|
|
pkgs.xdg-desktop-portal-gtk
|
|
pkgs.darkman
|
|
];
|
|
portals = pkgs.symlinkJoin {
|
|
name = "xdg-portals";
|
|
paths = [ portals-config ] ++ packages;
|
|
pathsToLink = [
|
|
"/share/xdg-desktop-portal/portals"
|
|
"/share/applications"
|
|
];
|
|
};
|
|
in {
|
|
home.sessionVariables = {
|
|
XDG_DESKTOP_PORTAL_DIR = "${portals}/share/xdg-desktop-portal/portals";
|
|
};
|
|
|
|
home.packages = packages;
|
|
}
|