1
0
Fork 0
mirror of https://github.com/inexcode/nixos-config.git synced 2024-12-04 20:36:34 +00:00
nixos-config/Desktop/lockservice.nix
2024-12-02 12:40:42 +03:00

18 lines
400 B
Nix

{ config, pkgs, lib, fetchpatch, ... }:
{
systemd.services."lock-inex" = {
description = "Lock Inex' session";
environment = config.nix.envVars // {
DISPLAY = ":0";
WAYLAND_DISPLAY = "wayland-0";
};
restartIfChanged = false;
serviceConfig = {
User = "inex";
Type = "simple";
ExecStart = "${pkgs.xdg-utils}/bin/xdg-screensaver lock";
};
};
}