Skip to content

Commit

Permalink
WIP: hyprland: Add swaylock
Browse files Browse the repository at this point in the history
  • Loading branch information
TLATER committed Oct 8, 2023
1 parent 8374dc2 commit 14c0e79
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
25 changes: 25 additions & 0 deletions home-config/config/desktop/hyprland.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
...
}: let
hyprctl = "${flake-inputs.hyprland.packages.${pkgs.system}.hyprland-nvidia}/bin/hyprctl";
loginctl = "${pkgs.systemd}/bin/loginctl";

wpaperd-config = {
default = {
Expand Down Expand Up @@ -55,14 +56,38 @@ in {
enable = true;
systemdTarget = "graphical-session.target";

events = [
{
event = "lock";
command = "${config.programs.swaylock.package}/bin/swaylock";
}
];

timeouts = [
{
timeout = 5 * 60;
command = "${hyprctl} dispatch dpms off";
}
{
timeout = 6 * 60;
command = "${loginctl} lock-session";
}
];
};

programs.swaylock = {
enable = true;
package = pkgs.swaylock-effects;
settings = {
screenshots = true;
clock = true;
indicator = true;
indicator-radius = 100;
indicator-thickness = 7;
effect-blur = "7x5";
};
};

systemd.user.services.wpaperd = {
Unit = {
Description = "Wallpaper daemon";
Expand Down
2 changes: 2 additions & 0 deletions nixos-config/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@
hyprland.enable = true;
};

security.pam.services.swaylock = {};

fonts = {
enableDefaultFonts = true;

Expand Down

0 comments on commit 14c0e79

Please sign in to comment.