How do I automatically lock the screen in NixOS?  I've installed
xautolock and slock.  And tested

  sudo xautolock -time 1 -locker slock

in the shell, which works fine.  Can I make it work without sudo?

It's a problem because these lines in configuration.nix:

    displayManager.sessionCommands =
      ''
      sudo xautolock -time 1 -locker slock &
      '';

result in

  sudo: no tty present and no askpass program specified

So it fails to start.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to