From c1dc0754d77ca8cbfc7dc1b6f113817d11187b50 Mon Sep 17 00:00:00 2001 From: Jacob Michels Date: Mon, 22 Jun 2026 18:41:52 -0400 Subject: [PATCH 1/2] docs(dankgreeter): document NixOS auto-login The nixpkgs dms-greeter module supports declarative auto-login via services.displayManager.autoLogin.{enable,user} and services.displayManager.defaultSession, but the NixOS installation page didn't mention it. Add an Auto-login section covering the required options and noting that the session command is resolved declaratively (so it survives rebuilds and garbage collection), which is the durable alternative to the greeter's remembered-session auto-login on NixOS. Refs AvengeMedia/DankMaterialShell#2591 --- docs/dankgreeter/nixos.mdx | 31 +++++++++++++++++++ .../version-1.4/dankgreeter/nixos.mdx | 31 +++++++++++++++++++ 2 files changed, 62 insertions(+) diff --git a/docs/dankgreeter/nixos.mdx b/docs/dankgreeter/nixos.mdx index f8c1124..b06bf97 100644 --- a/docs/dankgreeter/nixos.mdx +++ b/docs/dankgreeter/nixos.mdx @@ -111,6 +111,37 @@ When using the flake package with the native nixpkgs module, some dependencies m ::: +## Auto-login + +DankGreeter can skip the login screen and launch a session automatically on +boot using the standard NixOS display-manager options: + +```nix +services.displayManager = { + autoLogin = { + enable = true; + user = "yourusername"; + }; + + # Required for auto-login: identifies which session to launch. + # Use the .desktop basename without the extension (e.g. "niri", "hyprland"). + defaultSession = "niri"; +}; +``` + +`defaultSession` (or at least one entry in +`services.displayManager.sessionPackages`) is required — the module needs to +know which session to start, and will fail to build otherwise. + +:::tip + +The session launch command is resolved declaratively from your current session +packages, so it stays correct across rebuilds and won't break after +`nix-collect-garbage`. Prefer this over the greeter's remembered-session +auto-login on NixOS. + +::: + ## Rebuilding After making configuration changes, don't forget to rebuild your configuration: diff --git a/versioned_docs/version-1.4/dankgreeter/nixos.mdx b/versioned_docs/version-1.4/dankgreeter/nixos.mdx index 51396df..58d8a1e 100644 --- a/versioned_docs/version-1.4/dankgreeter/nixos.mdx +++ b/versioned_docs/version-1.4/dankgreeter/nixos.mdx @@ -111,6 +111,37 @@ When using the flake package with the native nixpkgs module, some dependencies m ::: +## Auto-login + +DankGreeter can skip the login screen and launch a session automatically on +boot using the standard NixOS display-manager options: + +```nix +services.displayManager = { + autoLogin = { + enable = true; + user = "yourusername"; + }; + + # Required for auto-login: identifies which session to launch. + # Use the .desktop basename without the extension (e.g. "niri", "hyprland"). + defaultSession = "niri"; +}; +``` + +`defaultSession` (or at least one entry in +`services.displayManager.sessionPackages`) is required — the module needs to +know which session to start, and will fail to build otherwise. + +:::tip + +The session launch command is resolved declaratively from your current session +packages, so it stays correct across rebuilds and won't break after +`nix-collect-garbage`. Prefer this over the greeter's remembered-session +auto-login on NixOS. + +::: + ## Rebuilding After making configuration changes, don't forget to rebuild your configuration: From 42d7600382bbf7d7fd80680219e9a2158dc97d08 Mon Sep 17 00:00:00 2001 From: LuckShiba Date: Tue, 23 Jun 2026 02:25:19 -0300 Subject: [PATCH 2/2] nix: remove greeter auto-login remembered-session warning --- docs/dankgreeter/nixos.mdx | 9 --------- 1 file changed, 9 deletions(-) diff --git a/docs/dankgreeter/nixos.mdx b/docs/dankgreeter/nixos.mdx index b06bf97..0c221d5 100644 --- a/docs/dankgreeter/nixos.mdx +++ b/docs/dankgreeter/nixos.mdx @@ -133,15 +133,6 @@ services.displayManager = { `services.displayManager.sessionPackages`) is required — the module needs to know which session to start, and will fail to build otherwise. -:::tip - -The session launch command is resolved declaratively from your current session -packages, so it stays correct across rebuilds and won't break after -`nix-collect-garbage`. Prefer this over the greeter's remembered-session -auto-login on NixOS. - -::: - ## Rebuilding After making configuration changes, don't forget to rebuild your configuration: