2023-09-08 16:10:15 +02:00
|
|
|
{
|
2023-10-13 21:04:24 +02:00
|
|
|
config,
|
2023-09-08 16:10:15 +02:00
|
|
|
inputs,
|
2023-10-13 21:04:24 +02:00
|
|
|
lib,
|
2023-09-08 16:10:15 +02:00
|
|
|
pkgs,
|
|
|
|
...
|
2024-05-05 12:38:40 +02:00
|
|
|
}: let
|
2023-10-13 21:04:24 +02:00
|
|
|
cfg = config.myOptions.programs.swaylock;
|
2024-04-14 18:49:29 +02:00
|
|
|
inherit (config.myOptions.other.system) username;
|
2024-05-05 12:38:40 +02:00
|
|
|
|
2024-07-25 11:45:44 +02:00
|
|
|
inherit (lib.modules) mkIf;
|
|
|
|
inherit (lib.options) mkEnableOption;
|
2023-10-13 21:04:24 +02:00
|
|
|
in {
|
2024-04-05 22:59:32 +02:00
|
|
|
options.myOptions.programs.swaylock.enable = mkEnableOption "swaylock";
|
2023-10-13 21:04:24 +02:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2023-11-25 19:16:22 +01:00
|
|
|
# https://github.com/NixOS/nixpkgs/issues/158025
|
|
|
|
security.pam.services.swaylock.text = "auth include login";
|
|
|
|
|
2024-02-29 00:29:56 +01:00
|
|
|
home-manager.users.${username} = {
|
2023-10-13 21:04:24 +02:00
|
|
|
programs.swaylock = {
|
|
|
|
enable = true;
|
|
|
|
package = inputs.nixpkgs-wayland.packages.${pkgs.system}.swaylock-effects;
|
|
|
|
settings = {
|
|
|
|
daemonize = false;
|
|
|
|
show-failed-attempts = true;
|
|
|
|
clock = true;
|
|
|
|
screenshots = true;
|
|
|
|
effect-blur = "9x5";
|
|
|
|
effect-vignette = "0.5:0.5";
|
|
|
|
indicator = true;
|
|
|
|
indicator-radius = 200;
|
|
|
|
indicator-thickness = 20;
|
|
|
|
color = "1e1e2e";
|
|
|
|
bs-hl-color = "f5e0dc";
|
|
|
|
caps-lock-bs-hl-color = "f5e0dc";
|
|
|
|
caps-lock-key-hl-color = "a6e3a1";
|
|
|
|
inside-color = "00000000";
|
|
|
|
inside-clear-color = "00000000";
|
|
|
|
inside-caps-lock-color = "00000000";
|
|
|
|
inside-ver-color = "00000000";
|
|
|
|
inside-wrong-color = "00000000";
|
|
|
|
key-hl-color = "a6e3a1";
|
|
|
|
layout-bg-color = "00000000";
|
|
|
|
layout-border-color = "00000000";
|
|
|
|
layout-text-color = "cdd6f4";
|
|
|
|
line-color = "00000000";
|
|
|
|
line-clear-color = "00000000";
|
|
|
|
line-caps-lock-color = "00000000";
|
|
|
|
line-ver-color = "00000000";
|
|
|
|
line-wrong-color = "00000000";
|
|
|
|
ring-color = "b4befe";
|
|
|
|
ring-clear-color = "f5e0dc";
|
|
|
|
ring-caps-lock-color = "fab387";
|
|
|
|
ring-ver-color = "89b4fa";
|
|
|
|
ring-wrong-color = "eba0ac";
|
|
|
|
separator-color = "00000000";
|
|
|
|
text-color = "cdd6f4";
|
|
|
|
text-clear-color = "f5e0dc";
|
|
|
|
text-caps-lock-color = "fab387";
|
|
|
|
text-ver-color = "89b4fa";
|
|
|
|
text-wrong-color = "eba0ac";
|
|
|
|
grace = 2;
|
|
|
|
grace-no-mouse = true;
|
|
|
|
grace-no-touch = true;
|
|
|
|
fade-in = 0.2;
|
|
|
|
ignore-empty-password = true;
|
|
|
|
};
|
|
|
|
};
|
2023-09-08 16:10:15 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|