diff --git a/modules/wms/wayland/hyprland/binds.nix b/modules/wms/wayland/hyprland/binds.nix index e225f57..3e923a1 100644 --- a/modules/wms/wayland/hyprland/binds.nix +++ b/modules/wms/wayland/hyprland/binds.nix @@ -1,10 +1,8 @@ { - config, lib, pkgs, ... }: let - cfg = config.modules.desktops.hyprland; inherit (builtins) map genList toString; inherit (lib.meta) getExe getExe'; in { @@ -49,10 +47,10 @@ in { "$mainMod, V, togglespecialworkspace, audio" # Reload hyprland - "$mainMod, R, exec, ${cfg.package}/bin/hyprctl reload" + "$mainMod, R, exec, ${getExe' pkgs.hyprland "hyprctl"} reload" # Restart waybar - "$mainMod CONTROL, B, exec, ${pkgs.procps}/bin/pkill waybar || ${pkgs.waybar}/bin/waybar" + "$mainMod CONTROL, B, exec, ${pkgs.procps}/bin/pkill waybar || ${getExe pkgs.waybar}" ]; binde = [ diff --git a/modules/wms/wayland/hyprland/module.nix b/modules/wms/wayland/hyprland/module.nix index e745493..2ecec85 100644 --- a/modules/wms/wayland/hyprland/module.nix +++ b/modules/wms/wayland/hyprland/module.nix @@ -5,11 +5,11 @@ pkgs, ... }: let - cfg = config.modules.desktops.hyprland; - # inherit (inputs.hyprsplit.packages.${pkgs.system}) hyprsplit; - inherit (lib.modules) mkIf mkDefault; + inherit (lib.modules) mkIf; inherit (lib.options) mkOption; - inherit (lib.types) bool enum package; + inherit (lib.types) bool; + + cfg = config.modules.desktops.hyprland; in { imports = [ ./binds.nix @@ -19,8 +19,6 @@ in { ./workspaces.nix inputs.hyprland.nixosModules.default ]; - # we disable the default hyprland module - # disabledModules = ["programs/hyprland.nix"]; options.modules.desktops.hyprland = { enable = mkOption { @@ -30,19 +28,6 @@ in { Whether to enable Hyprland wayland compositor. ''; }; - - package = mkOption { - type = package; - default = pkgs.hyprland; - description = '' - The Hyprland package to be used. - ''; - }; - portalPackage = mkOption { - type = package; - default = pkgs.xdg-desktop-portal-hyprland; - description = "The hyprland portal package"; - }; }; config = mkIf cfg.enable { @@ -59,15 +44,14 @@ in { # xdg Portal xdg.portal = { enable = true; - configPackages = mkDefault [ - pkgs.xdg-desktop-portal-hyprland - ]; + xdgOpenUsePortal = true; extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-hyprland ]; config = { - common.default = ["gtk" "hyprland"]; + common.default = ["*"]; + hyprland.default = ["gtk" "hyprland"]; }; }; };