2022-04-27 00:21:19 +02:00
|
|
|
{ pkgs
|
|
|
|
, config
|
|
|
|
, lib
|
|
|
|
, ...
|
2022-03-01 22:19:03 +01:00
|
|
|
}:
|
|
|
|
with lib; let
|
|
|
|
cfg = config.eboskma.greetd;
|
2022-04-27 00:21:19 +02:00
|
|
|
in
|
|
|
|
{
|
2021-11-17 16:32:18 +01:00
|
|
|
options.eboskma.greetd = {
|
|
|
|
enable = mkEnableOption "enable greetd";
|
|
|
|
};
|
|
|
|
|
2022-03-18 21:14:51 +01:00
|
|
|
config =
|
2022-05-03 18:17:38 +02:00
|
|
|
mkIf cfg.enable
|
2022-04-27 00:21:19 +02:00
|
|
|
{
|
|
|
|
services.greetd = {
|
|
|
|
enable = true;
|
|
|
|
restart = true;
|
|
|
|
settings = {
|
|
|
|
default_session = {
|
|
|
|
command = "${pkgs.sway}/bin/sway --config /etc/greetd/sway-config";
|
|
|
|
};
|
2022-03-18 21:14:51 +01:00
|
|
|
};
|
2021-11-17 16:32:18 +01:00
|
|
|
};
|
2022-04-27 00:21:19 +02:00
|
|
|
environment.systemPackages = with pkgs; [ greetd.gtkgreet quintom-cursor-theme papirus-icon-theme arc-theme ];
|
2021-11-17 16:32:18 +01:00
|
|
|
|
2022-04-27 00:21:19 +02:00
|
|
|
environment.etc = {
|
|
|
|
"greetd/sway-config" = {
|
|
|
|
text = ''
|
|
|
|
# `-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'
|
|
|
|
include /etc/sway/config.d/*
|
|
|
|
'';
|
|
|
|
user = "greeter";
|
|
|
|
group = "greeter";
|
|
|
|
};
|
|
|
|
"greetd/environments" = {
|
|
|
|
text = ''
|
|
|
|
${pkgs.sway}/bin/sway
|
|
|
|
${pkgs.bash}/bin/bash
|
|
|
|
'';
|
|
|
|
user = "greeter";
|
|
|
|
group = "greeter";
|
|
|
|
};
|
|
|
|
"sway/config.d/systemd-env.conf" = {
|
|
|
|
text = ''
|
|
|
|
exec_always --no-startup-id systemctl --user import-environment _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK
|
|
|
|
exec_always --no-startup-id dbus-update-activation-environment --systemd _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
"xdg/gtk-3.0/settings.ini" = {
|
|
|
|
text = generators.toINI { } {
|
|
|
|
Settings = {
|
|
|
|
gtk-theme-name = "Arc-Dark";
|
|
|
|
gtk-icon-theme-name = "Papirus-Dark";
|
|
|
|
gtk-cursor-theme-name = "Quintom_Ink";
|
|
|
|
gtk-application-prefer-dark-theme = "true";
|
|
|
|
};
|
2022-03-18 21:14:51 +01:00
|
|
|
};
|
2022-01-03 13:03:10 +01:00
|
|
|
};
|
|
|
|
};
|
2021-11-17 16:32:18 +01:00
|
|
|
};
|
|
|
|
}
|