2

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.

l0b0
  • 50,672
  • 41
  • 197
  • 360
  • Please add your xserver configuration from `/etc/nixos/configuration.nix`. – Emmanuel Rosa Jul 23 '19 at 09: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. – Emmanuel Rosa Jul 24 '19 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 04 '19 at 06:07

1 Answers1

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"}),
l0b0
  • 50,672
  • 41
  • 197
  • 360