Stop screen locking in Plasma

I’m running NixOS in a virtual machine, and after 5-10 minutes the screen locks and I have to type my password to unlock it.

I know how to prevent this by going to the GUI in Plasma and changing it there, but I’d like this setting change to be in my Nix configuration so when I distribute a Nix file to colleagues/testers they get a similar environment as me, instead of having to either keep an image up-to-date and or get them to follow a readme.

Is there anyway I can change this in configuration.nix?

1 Like

try

services.xserver.xautolock.time = 15 # default value

and change default value maybe

https://search.nixos.org/options?channel=21.05&show=services.xserver.xautolock.time&from=0&size=50&sort=relevance&type=packages&query=xserver

1 Like