90 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 *

This commit is contained in:
2024-03-07 00:07:23 +01:00
parent b655dafce9
commit b261562377
6 changed files with 58 additions and 23 deletions

39
modules/nixos/greetd.nix Normal file
View File

@ -0,0 +1,39 @@
{
config,
lib,
pkgs,
...
}: let
swayConfig = pkgs.writeText "greetd-sway-config" ''
input * {
xkb_layout "de"
xkb_options "caps:ctrl_modifier"
xkb_numlock "enable"
}
input "type:touchpad" {
tap "enable"
natural_scroll "enable"
}
# `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet.
exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l; swaymsg exit"
bindsym Mod4+shift+e exec swaynag \
-t warning \
-m 'What do you want to do?' \
-b 'Poweroff' 'systemctl poweroff' \
-b 'Reboot' 'systemctl reboot'
'';
in {
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.sway}/bin/sway --config ${swayConfig}";
};
};
};
environment.etc."greetd/environments".text = ''
sway
'';
}

View File

@ -67,6 +67,7 @@ in {
xdg.portal = {
enable = true;
wlr.enable = true;
config.common.default = ["wlr" "gtk"];
# gtk portal needed to make gtk apps happy
extraPortals = [pkgs.xdg-desktop-portal-gtk];
};