NixOS Installation (Flake)
██████╗ █████╗ ███╗ ██╗██╗ ██╗ ██████╗ ██████╗ ███████╗███████╗████████╗
██╔══██╗██╔══██╗████╗ ██║██║ ██╔╝██╔════╝ ██╔══██╗██╔════╝██╔════╝╚══██╔══╝
██║ ██║███████║██╔██╗ ██║█████╔╝ ██║ ███╗██████╔╝█████╗ █████╗ ██║
██║ ██║██╔══██║██║╚██╗██║██╔═██╗ ██║ ██║██╔══██╗██╔══╝ ██╔══╝ ██║
██████╔╝██║ ██║██║ ╚████║██║ ██╗╚██████╔╝██║ ██║███████╗███████╗ ██║
╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚══════╝ ╚═╝
DankGreeter can be installed on NixOS using the NixOS module. This guide covers the flake-based installation method.
DankGreeter is available in nixpkgs stable (26.05). If you're on NixOS 26.05+, the Installation - NixOS method is recommended and doesn't require flakes. Use the Flake option if you want quicker updates.
Installation
1. Add Flake Inputs
Add the required flake inputs to your flake.nix if you haven't yet:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
dms = {
url = "github:AvengeMedia/DankMaterialShell/stable";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}
If you want to use the -git version from the master branch, you can use:
dms.url = "github:AvengeMedia/DankMaterialShell";
However, be aware that the documentation may not be updated for the latest changes. You're advised to check the nix source code in the repository directly, and note that it may not work properly.
2. Import the NixOS Module
Add the DankGreeter module to your NixOS configuration imports:
imports = [
inputs.dms.nixosModules.greeter
];
DankGreeter is only available as a NixOS module (not as a home-manager module), since it needs to run at the system level for login management.
3. Enable DankGreeter
Enable and configure the greeter in your NixOS configuration:
programs.dank-material-shell.greeter = {
enable = true;
compositor.name = "niri"; # Or "hyprland" or "sway"
};
Unlike DankMaterialShell which can be installed via either the NixOS module or home-manager module, DankGreeter must be configured in your NixOS system configuration (not in home-manager).
Compositors must be installed via NixOS configuration to appear in DankGreeter, not via home-manager.
Configuration Options
programs.dank-material-shell.greeter = {
compositor = {
name = "niri"; # Required. Can be also "hyprland" or "sway"
customConfig = ''
# Optional custom compositor configuration
'';
};
# Sync your user's DankMaterialShell 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;
};
Rebuilding
After making configuration changes, don't forget to rebuild your configuration:
sudo nixos-rebuild switch