diff --git a/home/programs/zsh.nix b/home/programs/zsh.nix index 2346d9a..e0d830b 100644 --- a/home/programs/zsh.nix +++ b/home/programs/zsh.nix @@ -4,7 +4,6 @@ }: let gnome-keyring-daemon = "${pkgs.gnome-keyring}/bin/gnome-keyring-daemon"; - hyprland = "${config.wayland.windowManager.hyprland.finalPackage}/bin/Hyprland"; in { programs.zsh = { @@ -24,11 +23,6 @@ in eval $(${gnome-keyring-daemon} -s -d 2> /dev/null) export SSH_AUTH_SOCK ''; - profileExtra = '' - if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ] ; then - exec ${hyprland} - fi - ''; shellAliases = { cat = "${pkgs.bat}/bin/bat"; cp = "cp -v"; diff --git a/home/wm/default.nix b/home/wm/default.nix index 49e9b12..3ed2ea6 100644 --- a/home/wm/default.nix +++ b/home/wm/default.nix @@ -9,13 +9,11 @@ xdgOpenUsePortal = true; extraPortals = [ pkgs.xdg-desktop-portal-gtk - pkgs.xdg-desktop-portal-hyprland ]; config = { common = { default = [ "gtk" ]; }; }; - configPackages = [ pkgs.hyprland ]; }; } diff --git a/home/wm/hyprland/default.nix b/home/wm/hyprland/default.nix index d941262..6288bb7 100644 --- a/home/wm/hyprland/default.nix +++ b/home/wm/hyprland/default.nix @@ -1,5 +1,6 @@ { config , pkgs +, lib , ... }: let @@ -22,6 +23,15 @@ let pictures = "${config.xdg.userDirs.pictures}"; in { + xdg.portal = { + extraPortals = [ pkgs.xdg-desktop-portal-hyprland ]; + configPackages = [ pkgs.hyprland ]; + }; + programs.zsh.profileExtra = '' + if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ] ; then + exec ${lib.getExe config.wayland.win.hyprland.package} + fi + ''; wayland.windowManager.hyprland = { enable = true; systemd = {