Files
nixos/Droidnix/generated/modules/traveldroid/desktop/xdg.nix
T
2026-04-20 19:53:28 +02:00

46 lines
1.2 KiB
Nix

# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, pkgs, flakeRoot, ... }:
let
# Use the config option defaultUser directly, fallback to "henrov"
username = config.defaultUser or "henrov";
# Portal backends
basePortal = pkgs.xdg-desktop-portal-gtk; # full portal implementation
hyprlandPortal = pkgs.xdg-desktop-portal-hyprland; # Hyprland screencast
in
{
#################################
# Enable XDG desktop portals system-wide
#################################
xdg.portal.enable = true;
# Base + Hyprland portals
xdg.portal.extraPortals = [ basePortal hyprlandPortal ];
# Map screencast interface explicitly to Hyprland
xdg.portal.config = {
"org.freedesktop.impl.portal.Screencast".backend = "hyprland";
};
#################################
# Install portal packages system-wide
#################################
environment.systemPackages = [
basePortal
hyprlandPortal
];
#################################
# Home Manager user configuration
#################################
home-manager.users = {
${username} = {
home.packages = [
basePortal
hyprlandPortal
];
};
};
}