summaryrefslogtreecommitdiffstats
path: root/lass/2configs/screenlock.nix
blob: 237127f694befe15b4af318bce9e5468b30c2359 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{ pkgs, config, ... }:

{
  systemd.services.screenlock = {
    before = [ "sleep.target" ];
    wantedBy = [ "sleep.target" ];
    environment = {
      DISPLAY = ":${toString config.services.xserver.display}";
    };
    serviceConfig = {
      SyslogIdentifier = "screenlock";
      ExecStart = "${pkgs.i3lock}/bin/i3lock -i /var/lib/wallpaper/wallpaper -f";
      Type = "forking";
      User = "lass";
    };
  };
}