45 lines
1.1 KiB
Nix
45 lines
1.1 KiB
Nix
{ 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.configPackages = {
|
|
"org.freedesktop.impl.portal.Screencast" = [ hyprlandPortal ];
|
|
};
|
|
|
|
#################################
|
|
# Install portal packages system-wide
|
|
#################################
|
|
environment.systemPackages = [
|
|
basePortal
|
|
hyprlandPortal
|
|
];
|
|
|
|
#################################
|
|
# Home Manager user configuration
|
|
#################################
|
|
home-manager.users = {
|
|
${username} = {
|
|
home.packages = [
|
|
basePortal
|
|
hyprlandPortal
|
|
];
|
|
};
|
|
};
|
|
}
|