35 lines
838 B
Nix
35 lines
838 B
Nix
{ lib, config, pkgs, flakeRoot, ... }:
|
|
|
|
let
|
|
# Use the config option defaultUser directly, fallback to "henrov"
|
|
username = config.defaultUser or "henrov";
|
|
xdgPortalHyprlandPkg = pkgs.xdg-desktop-portal-hyprland;
|
|
in
|
|
{
|
|
#################################
|
|
# Enable XDG desktop portals system-wide
|
|
#################################
|
|
xdg.portal.enable = true;
|
|
xdg.portal.extraPortals = [ xdgPortalHyprlandPkg ];
|
|
|
|
#################################
|
|
# Install XDG portal package system-wide
|
|
#################################
|
|
environment.systemPackages = [
|
|
xdgPortalHyprlandPkg
|
|
];
|
|
|
|
#################################
|
|
# Home Manager user configuration
|
|
#################################
|
|
home-manager.users = {
|
|
${username} = {
|
|
home.packages = [
|
|
xdgPortalHyprlandPkg
|
|
];
|
|
};
|
|
};
|
|
} };
|
|
};
|
|
}
|