skipper: refactor hyprland stuff

This commit is contained in:
Adithya 2024-09-23 20:49:06 +05:30
parent 7c04f41412
commit 524ca0b9c5
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C
3 changed files with 10 additions and 8 deletions

View file

@ -4,7 +4,6 @@
}: }:
let let
gnome-keyring-daemon = "${pkgs.gnome-keyring}/bin/gnome-keyring-daemon"; gnome-keyring-daemon = "${pkgs.gnome-keyring}/bin/gnome-keyring-daemon";
hyprland = "${config.wayland.windowManager.hyprland.finalPackage}/bin/Hyprland";
in in
{ {
programs.zsh = { programs.zsh = {
@ -24,11 +23,6 @@ in
eval $(${gnome-keyring-daemon} -s -d 2> /dev/null) eval $(${gnome-keyring-daemon} -s -d 2> /dev/null)
export SSH_AUTH_SOCK export SSH_AUTH_SOCK
''; '';
profileExtra = ''
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ] ; then
exec ${hyprland}
fi
'';
shellAliases = { shellAliases = {
cat = "${pkgs.bat}/bin/bat"; cat = "${pkgs.bat}/bin/bat";
cp = "cp -v"; cp = "cp -v";

View file

@ -9,13 +9,11 @@
xdgOpenUsePortal = true; xdgOpenUsePortal = true;
extraPortals = [ extraPortals = [
pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-gtk
pkgs.xdg-desktop-portal-hyprland
]; ];
config = { config = {
common = { common = {
default = [ "gtk" ]; default = [ "gtk" ];
}; };
}; };
configPackages = [ pkgs.hyprland ];
}; };
} }

View file

@ -1,5 +1,6 @@
{ config { config
, pkgs , pkgs
, lib
, ... , ...
}: }:
let let
@ -22,6 +23,15 @@ let
pictures = "${config.xdg.userDirs.pictures}"; pictures = "${config.xdg.userDirs.pictures}";
in 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 = { wayland.windowManager.hyprland = {
enable = true; enable = true;
systemd = { systemd = {