Skip to main content
Version: 2.0

NixOS Installation

Dux Greeter

NixOS Installation

Dux Greeter can be installed on NixOS using the native nixpkgs module. This is the recommended installation method for users on NixOS 26.05+.

Installation​

1. Enable Dux Greeter​

Enable and configure the greeter in your NixOS configuration:

services.displayManager.dms-greeter = {
enable = true;
compositor.name = "niri"; # Or "hyprland" or "sway"
};
warning

Compositors must be installed via NixOS configuration to appear in Dux Greeter, not via home-manager.

Configuration Options​

services.displayManager.dms-greeter = {
compositor = {
name = "niri"; # Required. Can be also "hyprland" or "sway"
customConfig = ''
# Optional custom compositor configuration
'';
};

# Sync your user's Dux Shell theme with the greeter. You'll probably want this
configHome = "/home/yourusername";

# Custom config files for non-standard config locations
configFiles = [
"/home/yourusername/.config/DankMaterialShell/settings.json"
];

# Save the logs to a file
logs = {
save = true;
path = "/tmp/dms-greeter.log";
};

# Custom Quickshell Package
quickshell.package = pkgs.quickshell;
};

Using Flake Package with NixOS Module​

You can use the package from the dank-greeter flake while still using the native NixOS module. This allows you to get quicker updates while keeping the module configuration:

First, add the flake input to your flake.nix:

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";

dank-greeter = {
url = "github:duxlabs-dev/dux-greeter";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}

Then use the flake package with the native module:

services.displayManager.dms-greeter = {
enable = true;
compositor.name = "niri";
package = inputs.dank-greeter.packages.${pkgs.stdenv.hostPlatform.system}.default;
};
warning

When using the flake package with the native nixpkgs module, some dependencies may not be automatically enabled by default, and certain configurations might be missing. You may need to manually install optional dependencies or adjust settings to match your needs.

Auto-login​

Dux Greeter can skip the login screen and launch a session automatically on boot using the standard NixOS display-manager options:

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.

Authentication (PAM)​

On NixOS, /etc/pam.d/greetd is generated by the module system, so DMS's automatic PAM management does not apply. Your system PAM policy is always authoritative for the greeter. This is equivalent to the Use system PAM authentication mode in Settings → Greeter.

To add fingerprint or security-key authentication to the greeter, extend the greetd service in your NixOS configuration:

security.pam.services.greetd = {
fprintAuth = true; # Fingerprint via pam_fprintd
u2fAuth = true; # Security key via pam_u2f (configure security.pam.u2f options)
};

Dux Greeter detects the modules present in the resolved greetd stack and adapts its prompts automatically.

Rebuilding​

After making configuration changes, don't forget to rebuild your configuration:

sudo nixos-rebuild switch