I've been using Awesome+LightDM with the GTK greeter on Arch Linux for some years, and I'm in the process of moving to NixOS. One issue with this has been the screen locker. I've mapped Windows-l to light-locker-command --lock. When activating that the screen goes black, then turns off. To get back to LightDM I have to press Ctrl-Alt-F7 and wait for about 10 seconds while some weird message about "being redirected to the unlock dialog" displays. I've tried installing and enabling both the "gtk" and "mini" greeters (not at the same time), but after restarting X neither of these seem to be used. How do I set either of them up?

The relevant part of the configuration:

services = {
  xserver = {
    displayManager.lightdm.enable = true;
    enable = true;
    layout = "us";
    libinput.enable = true;
    windowManager = {
      awesome.enable = true;
      default = "awesome";
    xkbOptions = "compose:caps";
    xkbVariant = "dvorak-alt-intl";

I also tried enabling programs.slock, but that doesn't integrate with lightdm.

  • Please add your xserver configuration from /etc/nixos/configuration.nix. Jul 23, 2019 at 9:53
  • The gtk greeter is enabled by default. Note that "installing" greeters don't have any effect on NixOS. Instead you must enable them via their corresponding NixOS modules. Say you want to use the mini greeter, have you tried disabling the gtk greeter and enabling the mini greeter? To be honest, I have no idea what happens when multiple greeters are enabled. Jul 24, 2019 at 12:29
  • @EmmanuelRosa The original question wasn't clear, but I never did try to enable both greeters at the same time. I just don't get why none of them work.
    – l0b0
    Aug 4, 2019 at 6:07

1 Answer 1


Set up a locker:

services.xserver.xautolock.enable = true;

, install xlockmore, then use it:

awful.key({ modkey }, "l", function () awful.spawn("xautolock -locknow") end,
          {description = "lock the screen", group = "client"}),

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.