Skip to content

nixos: xserver.displayManager: use slim for automatic logins #46396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 3 additions & 19 deletions nixos/modules/services/x11/display-managers/auto.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,28 +41,12 @@ in

config = mkIf cfg.enable {

services.xserver.displayManager.lightdm = {
services.xserver.displayManager.slim = {
enable = true;
autoLogin = {
enable = true;
user = cfg.user;
};
autoLogin = true;
defaultUser = cfg.user;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not an issue with this PR but we should standardize the settings so autoLogin works the same regardless of DM.

};

# lightdm by default doesn't allow auto login for root, which is
# required by some nixos tests. Override it here.
security.pam.services.lightdm-autologin.text = lib.mkForce ''
auth requisite pam_nologin.so
auth required pam_succeed_if.so quiet
auth required pam_permit.so

account include lightdm

password include lightdm

session include lightdm
'';

};

}
2 changes: 0 additions & 2 deletions nixos/tests/flatpak.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import ./make-test.nix ({ pkgs, ... }:
machine = { pkgs, ... }: {
imports = [ ./common/x11.nix ];
services.xserver.desktopManager.gnome3.enable = true; # TODO: figure out minimal environment where the tests work
# common/x11.nix enables the auto display manager (lightdm)
services.xserver.displayManager.gdm.enable = false;
environment.gnome3.excludePackages = pkgs.gnome3.optionalPackages;
services.flatpak.enable = true;
environment.systemPackages = with pkgs; [ gnupg gnome-desktop-testing ostree python2 ];
Expand Down