Configure greetd for autologin

This commit is contained in:
Charlotte Van Petegem 2023-03-20 15:10:20 +01:00
parent 4876d25d6c
commit d7c428481b
No known key found for this signature in database
GPG key ID: 019E764B7184435A

View file

@ -29,7 +29,25 @@ in
}; };
config = lib.mkIf config.chvp.graphical.sway.enable { config = lib.mkIf config.chvp.graphical.sway.enable {
services.dbus.packages = with pkgs; [ dconf ]; services = {
dbus.packages = with pkgs; [ dconf ];
greetd = {
enable = true;
settings =
let
wrapped-command = pkgs.writeShellScript "sway-run" "systemd-run sway $@";
in
{
default_session = {
command = "${pkgs.greetd.greetd}/bin/agreety --cmd ${wrapped-command}";
};
initial_session = {
command = "${wrapped-command}";
user = "charlotte";
};
};
};
};
security.pam.services.swaylock = { }; security.pam.services.swaylock = { };
xdg.portal = { xdg.portal = {
enable = true; enable = true;
@ -42,13 +60,7 @@ in
wf-recorder wf-recorder
wl-clipboard wl-clipboard
]; ];
programs = { programs.i3status-rust = {
zsh.loginExtra = ''
if [[ -z "$DISPLAY" ]] && [[ $(tty) = "/dev/tty1" ]]; then
exec sway
fi
'';
i3status-rust = {
enable = true; enable = true;
bars.default = { bars.default = {
settings = { settings = {
@ -137,7 +149,6 @@ in
]; ];
}; };
}; };
};
services = { services = {
kanshi = { kanshi = {
enable = true; enable = true;