NixOS must initiate a session lock after a 10-minute period of inactivity for graphical user login.

Severity
Group ID
Group Title
Version
Rule ID
Date
STIG Version
mediumV-268086SRG-OS-000029-GPOS-00010ANIX-00-000110SV-268086r1039559_rule2024-10-251
Description
A session time-out lock is a temporary action taken when a user stops work and moves away from the immediate physical vicinity of the information system but does not log out because of the temporary nature of the absence. Rather than relying on the user to manually lock their operating system session prior to vacating the vicinity, operating systems need to be able to identify when a user's session has idled and take action to initiate the session lock. The session lock is implemented at the point where session activity can be determined and/or controlled.
ℹ️ Check
Verify NixOS initiates a session lock after a 10-minute period of inactivity for graphical user login with the following command: $ sudo gsettings get org.gnome.desktop.session idle-delay uint32 600 If "idle-delay" is set to "0" or a value greater than "600", this is a finding.
✔️ Fix
Configure NixOS to initiate a session lock after a 10-minute period of inactivity for graphical user login. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix: programs.dconf.profiles.user.databases = with lib.gvariant; [ { settings."org/gnome/desktop/session".idle-delay = mkUint32 600; locks = [ "org/gnome/desktop/session/idle-delay" ]; } ]; Rebuild the NixOS configuration with the following command: $ sudo nixos-rebuild switch