nixos/system/home/swaylock/default.nix
Evie Litherland-Smith c9b3731026 Swap swaync for mako
Remove separate swaylockfx file, combine in default
2024-09-14 09:27:35 +01:00

53 lines
1.4 KiB
Nix

{
config,
pkgs,
accentColourName,
...
}:
{
home.packages = with pkgs; [
(writeShellScriptBin "swaylockfx" ''
${swaylock-effects}/bin/swaylock --screenshots --clock --indicator --grace-no-mouse
'')
];
programs.swaylock = {
enable = true;
package = pkgs.swaylock-effects;
# Settings are specifically for swaylock-effects
settings =
let
sc = config.scheme;
in
{
indicator-radius = 100;
indicator-thickness = 10;
indicator-caps-lock = true;
ignore-empty-password = true;
show-failed-attempts = true;
effect-blur = "5x3";
effect-vignette = "0.5:0.5";
grace = 2;
fade-in = 0.2;
bs-hl-color = sc.base06;
caps-lock-bs-hl-color = sc.base06;
caps-lock-key-hl-color = sc.green;
inside-color = "${sc.base00}cc";
key-hl-color = sc.green;
layout-bg-color = "${sc.base00}cc";
layout-border-color = sc.${accentColourName};
layout-text-color = sc.base05;
ring-color = sc.${accentColourName};
ring-clear-color = sc.base06;
ring-caps-lock-color = sc.base09;
ring-ver-color = sc.blue;
ring-wrong-color = sc.red;
separator-color = sc.base01;
text-color = sc.base05;
text-clear-color = sc.base06;
text-caps-lock-color = sc.base09;
text-ver-color = sc.blue;
text-wrong-color = sc.red;
};
};
}