{pkgs, ...}: { # Install swayidle and configure a systemd user service for idle locking environment.systemPackages = with pkgs; [swayidle swaylock inotify-tools]; systemd.user.services.swayidle = { description = "swayidle for Niri sessions"; wantedBy = ["default.target"]; serviceConfig = { ExecStart = "${pkgs.swayidle}/bin/swayidle -w 'timeout 300 ${pkgs.swaylock}/bin/swaylock -f' resume 'swaymsg resume'"; Restart = "on-failure"; }; }; }