nix-config/config/optional/wayland.nix

46 lines
1 KiB
Nix

{
lib,
minimal,
pkgs,
...
}:
lib.optionalAttrs (!minimal) {
services.dbus = {
enable = true;
implementation = "broker";
};
environment.systemPackages = with pkgs; [
wdisplays
wl-clipboard
wev
];
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
config.common = {
"org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ];
"org.freedesktop.impl.portal.ScreenCast" = [ "hyprland" ];
"org.freedesktop.impl.portal.Screenshot" = [ "hyprland" ];
"org.freedesktop.portal.FileChooser" = [ "xdg-desktop-portal-gtk" ];
};
extraPortals = [
pkgs.xdg-desktop-portal-hyprland
pkgs.xdg-desktop-portal-gtk
];
};
services.displayManager.enable = true;
programs.uwsm = {
enable = true;
waylandCompositors = {
hyprland = {
binPath = "/etc/profiles/per-user/patrick/bin/Hyprland";
prettyName = "Hyprland";
};
sway = {
binPath = "/etc/profiles/per-user/patrick/bin/sway";
prettyName = "Sway";
};
};
};
}