Use greetd to start sway
This commit is contained in:
parent
29525dc308
commit
c243056027
3 changed files with 39 additions and 15 deletions
|
|
@ -11,6 +11,29 @@ lib.mkIf (config.jalr.gui.enable && config.jalr.gui.desktop == "sway") {
|
|||
};
|
||||
};
|
||||
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings =
|
||||
let
|
||||
command = pkgs.writeShellScript "sway-init" ''
|
||||
systemctl --user import-environment PATH
|
||||
systemctl --user restart xdg-desktop-portal.service
|
||||
exec ${pkgs.sway}/bin/sway
|
||||
'';
|
||||
user = "jalr";
|
||||
in
|
||||
{
|
||||
default_session = {
|
||||
inherit command;
|
||||
inherit user;
|
||||
};
|
||||
initial_session = {
|
||||
inherit command;
|
||||
inherit user;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
security.polkit.enable = true;
|
||||
|
|
@ -26,9 +49,9 @@ lib.mkIf (config.jalr.gui.enable && config.jalr.gui.desktop == "sway") {
|
|||
icons.enable = true;
|
||||
portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-wlr
|
||||
xdg-desktop-portal-gtk
|
||||
wlr.enable = true;
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
];
|
||||
xdgOpenUsePortal = true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,17 @@
|
|||
let
|
||||
xkb_layout = "de,de";
|
||||
xkb_variant = "neo,";
|
||||
xkb_options = "grp:win_space_toggle";
|
||||
in
|
||||
{
|
||||
home.sessionVariables = {
|
||||
XKB_DEFAULT_LAYOUT = "de,de";
|
||||
XKB_DEFAULT_VARIANT = "neo,";
|
||||
XKB_DEFAULT_OPTIONS = "grp:win_space_toggle";
|
||||
XKB_DEFAULT_LAYOUT = xkb_layout;
|
||||
XKB_DEFAULT_VARIANT = xkb_variant;
|
||||
XKB_DEFAULT_OPTIONS = xkb_options;
|
||||
};
|
||||
wayland.windowManager.sway.config.input."type:keyboard" = {
|
||||
inherit xkb_layout;
|
||||
inherit xkb_variant;
|
||||
inherit xkb_options;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,15 +88,6 @@ in
|
|||
_JAVA_AWT_WM_NONREPARENTING = "1";
|
||||
};
|
||||
|
||||
programs.fish.loginShellInit = ''
|
||||
if [ -z $WAYLAND_DISPLAY ] && [ (tty) = /dev/tty1 ]
|
||||
export XDG_SESSION_TYPE="wayland" # otherwise set to tty
|
||||
set -e __HM_SESS_VARS_SOURCED
|
||||
set -e __NIXOS_SET_ENVIRONMENT_DONE
|
||||
exec systemd-cat -t sway dbus-run-session sway
|
||||
end
|
||||
'';
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue