43 lines
1.0 KiB
Nix
43 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
osConfig,
|
|
pkgs,
|
|
...
|
|
}:
|
|
with lib;
|
|
let
|
|
hyprlandCfg = osConfig.modules.hyprland;
|
|
pipewireCfg = osConfig.modules.pipewire;
|
|
plasmaCfg = osConfig.modules.plasma;
|
|
in
|
|
{
|
|
xdg = {
|
|
enable = true;
|
|
mime.enable = true;
|
|
mimeApps.enable = true;
|
|
portal = {
|
|
enable = true;
|
|
extraPortals = []
|
|
++ (if hyprlandCfg.enable
|
|
then [ pkgs.xdg-desktop-portal-hyprland ]
|
|
else [])
|
|
++ (if pipewireCfg.enable
|
|
then [
|
|
pkgs.xdg-desktop-portal-wlr
|
|
pkgs.xdg-desktop-portal-gtk
|
|
]
|
|
else [])
|
|
++ (if plasmaCfg.enable
|
|
then [ pkgs.kdePackages.xdg-desktop-portal-kde ]
|
|
else []);
|
|
configPackages = []
|
|
++ (if hyprlandCfg.enable
|
|
then [ pkgs.hyprland ]
|
|
else [])
|
|
++ (if plasmaCfg.enable
|
|
# TODO: use the correct packages or config
|
|
then [ pkgs.kdePackages.kde-gtk-config ]
|
|
else []);
|
|
};
|
|
};
|
|
} |