Jump to content

Sddm: Difference between revisions

From Official NixOS Wiki
Klinger (talk | contribs)
Phobos (talk | contribs)
m Added a autologin config
 
Line 8: Line 8:
   # Enables experimental Wayland support
   # Enables experimental Wayland support
   wayland.enable = true;
   wayland.enable = true;
};|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}}
};|name=/etc/nixos/configuration.nix|lang=nix}}



Latest revision as of 19:41, 2 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
  };
};

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";
    })
  ];
}