ctucx.git: nixfiles

ctucx' nixfiles

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
{ pkgs, ... }:

{

  security.pam.services.swaylock = {};

  services.systemd-lock-handler.enable = true;

  home-manager.users.katja = {
    systemd.user.services = {
      swaylock = {
        Unit.Requisite = [ "graphical-session.target" ];
        Unit.PartOf    = [ "lock.target" "sleep.target" ];

        Service.ExecStart    = "${pkgs.swaylock}/bin/swaylock -i /home/katja/Pictures/Backgrounds/lock.png";
        Service.ExecStopPost = "${pkgs.systemd}/bin/loginctl unlock-session";

        Install.WantedBy = [ "lock.target" "sleep.target" ];
      };
    };
  };

}