Jump to content

Sddm: Difference between revisions

From Official NixOS Wiki
Phobos (talk | contribs)
Created a page for SDDM
 
Phobos (talk | contribs)
m Added additional troubleshooting for fprint
 
(9 intermediate revisions by 4 users not shown)
Line 9: Line 9:
   wayland.enable = true;
   wayland.enable = true;
};|name=/etc/nixos/configuration.nix|lang=nix}}
};|name=/etc/nixos/configuration.nix|lang=nix}}
== Configuration ==
=== Wayland ===
{{File|3=services.displayManager.sddm = {
  enable = true;
  wayland = {
    enable = true;
    # default compositor is "weston", you can optionally change it to kwin
    #compositor = "kwin";
    };
  };
};|name=/etc/nixos/configuration.nix|lang=nix}}
=== Autologin ===
{{File|3=services.displayManager = {
  sddm = {
    enable = true;
    wayland.enable = true;
  };
  autoLogin = {
    enable = true;   
    user = "user"; # Replace with the desired user
  };
};|name=/etc/nixos/configuration.nix|lang=nix}}
=== Disable/Enable fprint ===
With fprint enabled on the system, SDDM will expect a fingerprint after entering any password. SDDM does not show any prompt for this and this will time out after some time and SDDM will attempt to use your entered password. If you have your fingerprints enrolled, you can press enter and use your fingerprint reader. You may find additional options for fprint as well as information on enrolling fingerprints on the [[Fingerprint scanner]] page.
KWallet cannot be unlocked using fprint.
==== Enable fprint system wide ====
You can enable this behavior by enabling fprint.
{{File|3=services.fprintd.enable = true;|name=/etc/nixos/configuration.nix|lang=nix}}
==== Disable fprint for login ====
Stops SDDM from prompting for fingerprint.
{{File|3=security.pam.services.login.fprintAuth = false;|name=/etc/nixos/configuration.nix|lang=nix}}
== Troubleshooting ==
=== SDDM Hangs after entering password ===
With fprint enabled, SDDM will expect a fingerprint after entering any password. SDDM is likely waiting for a fingerprint without a prompt. You can disable this behavior by seeing the fprint configuration section of this article.
=== SDDM does not unlock KWallet on KDE ===
This may be related to fprint. Using fprint to login cannot unlock KWallet since KWallet unlocks using the same password as your user, and does not support fingerprints to do so.
== Installing themes ==
You can install and configure a theme like so
{{File|3={ pkgs, ... }:
{
  services.displayManager.sddm = {
    enable = true;
    theme = "catppuccin-mocha-mauve";
  };
  environment.systemPackages = [
    (pkgs.catppuccin-sddm.override {
      flavor = "mocha";
      accent = "mauve";
    })
  ];
}|name=/etc/nixos/configuration.nix|lang=nix}}
[[Category:Display Manager]]

Latest revision as of 20:30, 26 February 2026

Simple Desktop Display Manager (SDDM) is a modern display manager for X11 and Wayland sessions.

Installation

SDDM can be enabled as the display manager with these lines.

❄︎ /etc/nixos/configuration.nix
services.displayManager.sddm = {
  enable = true;

  # Enables experimental Wayland support
  wayland.enable = true;
};

Configuration

Wayland

❄︎ /etc/nixos/configuration.nix
services.displayManager.sddm = {
  enable = true;

  wayland = {
    enable = true;

    # default compositor is "weston", you can optionally change it to kwin
    #compositor = "kwin";
    };
  };
};

Autologin

❄︎ /etc/nixos/configuration.nix
services.displayManager = {
  sddm = {
    enable = true;
    wayland.enable = true;
  };
  autoLogin = {
    enable = true;    
    user = "user"; # Replace with the desired user
  };
};

Disable/Enable fprint

With fprint enabled on the system, SDDM will expect a fingerprint after entering any password. SDDM does not show any prompt for this and this will time out after some time and SDDM will attempt to use your entered password. If you have your fingerprints enrolled, you can press enter and use your fingerprint reader. You may find additional options for fprint as well as information on enrolling fingerprints on the Fingerprint scanner page.

KWallet cannot be unlocked using fprint.

Enable fprint system wide

You can enable this behavior by enabling fprint.

❄︎ /etc/nixos/configuration.nix
services.fprintd.enable = true;

Disable fprint for login

Stops SDDM from prompting for fingerprint.

❄︎ /etc/nixos/configuration.nix
security.pam.services.login.fprintAuth = false;

Troubleshooting

SDDM Hangs after entering password

With fprint enabled, SDDM will expect a fingerprint after entering any password. SDDM is likely waiting for a fingerprint without a prompt. You can disable this behavior by seeing the fprint configuration section of this article.

SDDM does not unlock KWallet on KDE

This may be related to fprint. Using fprint to login cannot unlock KWallet since KWallet unlocks using the same password as your user, and does not support fingerprints to do so.

Installing themes

You can install and configure a theme like so

❄︎ /etc/nixos/configuration.nix
{ pkgs, ... }:
{
  services.displayManager.sddm = {
    enable = true;
    theme = "catppuccin-mocha-mauve";
  };

  environment.systemPackages = [ 
    (pkgs.catppuccin-sddm.override {
      flavor = "mocha";
      accent = "mauve";
    })
  ];
}