greetd: revert back to gtkgreet

This commit is contained in:
Erwin Boskma 2023-09-21 23:27:22 +02:00
parent cecd4b0698
commit 68194d9fa8
Signed by: erwin
SSH key fingerprint: SHA256:9LmFDe1C6jSrEyqxxvX8NtJBmcbB105XoqyUZF092bg
2 changed files with 20 additions and 6 deletions

View file

@ -5,12 +5,24 @@
}: }:
with lib; let with lib; let
cfg = config.eboskma.greetd; cfg = config.eboskma.greetd;
steamCfg = config.programs.steam;
style = builtins.replaceStrings [ "{WALLPAPER}" ] [ (builtins.toString ../../home-manager/modules/sway/wallpapers/river-2560.png) ] (builtins.readFile ./greetd.css); # style = builtins.replaceStrings [ "{WALLPAPER}" ] [ (builtins.toString ../../home-manager/modules/sway/wallpapers/river-2560.png) ] (builtins.readFile ./greetd.css);
wallpaper = ../../home-manager/modules/sway/wallpapers/river-2560.png;
style = builtins.readFile ./greetd.css;
swaySession = pkgs.writeShellScript "sway-session" '' swaySession = pkgs.writeShellScript "sway-session" ''
${pkgs.sway}/bin/sway --unsupported-gpu ${pkgs.sway}/bin/sway --unsupported-gpu
''; '';
steam-gamescope =
let
exports = builtins.attrValues (builtins.mapAttrs (n: v: "export ${n}=${v}") steamCfg.gamescopeSession.env);
in
pkgs.writeShellScriptBin "steam-gamescope" ''
${builtins.concatStringsSep "\n" exports}
gamescope --steam ${toString steamCfg.gamescopeSession.args} -- steam -tenfoot -pipewire-dmabuf
'';
in in
{ {
options.eboskma.greetd = { options.eboskma.greetd = {
@ -33,7 +45,7 @@ in
}; };
programs.regreet = { programs.regreet = {
enable = true; enable = false;
settings = { settings = {
background = { background = {
path = ../../home-manager/modules/sway/wallpapers/river-2560.png; path = ../../home-manager/modules/sway/wallpapers/river-2560.png;
@ -58,7 +70,7 @@ in
security.pam.services.greetd.u2fAuth = false; security.pam.services.greetd.u2fAuth = false;
# exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l -s /etc/greetd/gtkgreet.css; swaymsg exit" # exec "${pkgs.greetd.regreet}/bin/regreet; swaymsg exit"
networking.firewall.allowedTCPPorts = lib.mkIf cfg.wayvnc [ 5900 ]; networking.firewall.allowedTCPPorts = lib.mkIf cfg.wayvnc [ 5900 ];
@ -70,7 +82,7 @@ in
((lib.optional cfg.wayvnc "exec ${pkgs.wayvnc}/bin/wayvnc -g 0.0.0.0") ++ ((lib.optional cfg.wayvnc "exec ${pkgs.wayvnc}/bin/wayvnc -g 0.0.0.0") ++
[ [
'' ''
exec "${pkgs.greetd.regreet}/bin/regreet; swaymsg exit" exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l -s /etc/greetd/gtkgreet.css -b ${wallpaper}; swaymsg exit"
include /etc/sway/config.d/* include /etc/sway/config.d/*
'' ''
]); ]);
@ -79,7 +91,10 @@ in
}; };
"greetd/environments" = { "greetd/environments" = {
text = concatStringsSep "\n" ((optional cfg.sway "${swaySession}") text = concatStringsSep "\n" ((optional cfg.sway "${swaySession}")
++ [ "${pkgs.bash}/bin/bash" ]); ++ [
(toString steam-gamescope)
"${pkgs.bash}/bin/bash"
]);
user = "greeter"; user = "greeter";
group = "greeter"; group = "greeter";
}; };

View file

@ -1,5 +1,4 @@
window { window {
background-image: url("file://{WALLPAPER}");
background-size: cover; background-size: cover;
background-position: center; background-position: center;
} }