Skip to content
Merged
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: 22 additions & 0 deletions docs/dankgreeter/nixos.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,28 @@ 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.

## Rebuilding

After making configuration changes, don't forget to rebuild your configuration:
Expand Down
31 changes: 31 additions & 0 deletions versioned_docs/version-1.4/dankgreeter/nixos.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down