70 lines
1.6 KiB
Nix
70 lines
1.6 KiB
Nix
{
|
|
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"
|
|
}
|
|
|
|
exec dbus-sway-environment
|
|
exec configure-gtk
|
|
# `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet.
|
|
exec "${pkgs.greetd.regreet}/bin/regreet; 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 {
|
|
programs.regreet = {
|
|
enable = true;
|
|
settings = {
|
|
background = {
|
|
fit = "Containe";
|
|
path = "~/Documents/Blender/desktop background Informatiker/render 4K new color.png";
|
|
};
|
|
gtk = {
|
|
application_prefer_dark_theme = true;
|
|
cursor_theme_name = "capitaine-cursors-white";
|
|
font_name = "FiraCode Nerd Font";
|
|
icon_theme_name = "WhiteSur-dark";
|
|
theme_name = "WhiteSur-Dark";
|
|
};
|
|
commands = {
|
|
reboot = ["systemctl" "reboot"];
|
|
poweroff = ["systemctl" "poweroff"];
|
|
};
|
|
};
|
|
};
|
|
|
|
users.users.greeter = {
|
|
isNormalUser = false;
|
|
description = "Greeter";
|
|
extraGroups = [];
|
|
};
|
|
|
|
services.greetd = {
|
|
enable = true;
|
|
settings = {
|
|
initial_session = {
|
|
command = "${pkgs.sway}/bin/sway --config ${swayConfig}";
|
|
user = "greeter";
|
|
};
|
|
};
|
|
};
|
|
|
|
environment.etc."greetd/environments".text = ''
|
|
sway
|
|
'';
|
|
}
|