NixOS Installation
██████╗ █████╗ ███╗ ██╗██╗ ██╗ ██████╗ ██████╗ ███████╗███████╗████████╗
██╔══██╗██╔══██╗████╗ ██║██║ ██╔╝██╔════╝ ██╔══██╗██╔════╝██╔════╝╚══██╔══╝
██║ ██║███████║██╔██╗ ██║█████╔╝ ██║ ███╗██████╔╝█████╗ █████╗ ██║
██║ ██║██╔══██║██║╚██╗██║██╔═██╗ ██║ ██║██╔══██╗██╔══╝ ██╔══╝ ██║
██████╔╝██║ ██║██║ ╚████║██║ ██╗╚██████╔╝██║ ██║███████╗███████╗ ██║
╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚══════╝ ╚═╝
DankGreeter can be installed on NixOS using the NixOS module. This guide covers the flake-based installation method.
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-unstable";
dgop = {
url = "github:AvengeMedia/dgop";
inputs.nixpkgs.follows = "nixpkgs";
};
dankMaterialShell = {
url = "github:AvengeMedia/DankMaterialShell";
inputs.nixpkgs.follows = "nixpkgs";
inputs.dgop.follows = "dgop";
};
};
}
2. Import the NixOS Module
Add the DankGreeter module to your NixOS configuration imports:
imports = [
inputs.dankMaterialShell.nixosModules.greeter
];
note
This import is of the NixOS module, rather than the home-manager module on the dms NixOS installation page.
3. Enable DankGreeter
Enable and configure the greeter:
programs.dankMaterialShell.greeter = {
enable = true;
compositor.name = "niri"; # Or "hyprland" or "sway"
};
note
This is in your NixOS top-level configuration, not in the home-manager configuration like in the dms NixOS installation page.
Configuration Options
programs.dankMaterialShell.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