[Nix-dev] Automatically locking the screen with xautolock

2015-02-08 Thread Nikita Karetnikov
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

Re: [Nix-dev] Automatically locking the screen with xautolock

2015-02-08 Thread Michael Alyn Miller
The 02/08/2015 21:07, Nikita Karetnikov wrote: 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? I use xss-lock, which I recently added

Re: [Nix-dev] Automatically locking the screen with xautolock

2015-02-08 Thread Jeffrey David Johnson
Nice! I'm currently binding gksu 'i3lock -c00 pm-suspend' to a hotkey using i3, but this is better. Is there a standard way to get it in my fork of nixpkgs, which is tracking the release-14.12 branch? (I could just copy and paste but if there's a better way now would be a good time to

Re: [Nix-dev] Automatically locking the screen with xautolock

2015-02-08 Thread James Cook
If you're comfortable having it suid, you could set security.suidPrograms = [ xautolock ]; in configuration.nix. Then if xautolock is installed globally it will hopefully work without sudo. On 8 February 2015 at 10:07, Nikita Karetnikov nik...@karetnikov.org wrote: How do I automatically lock