Install Swaylock settings using Home Manager 🏗️
Hoping to fix: https://github.com/danth/stylix/issues/8#issuecomment-1194459148
This commit is contained in:
parent
d528e85140
commit
cd7b686352
1 changed files with 32 additions and 33 deletions
|
|
@ -10,37 +10,36 @@ let
|
|||
negative = base08-hex;
|
||||
|
||||
in {
|
||||
# mkAfter is important for those who use nixpkgs-wayland,
|
||||
# as otherwise it could overwrite our wrapper
|
||||
nixpkgs.overlays = lib.mkAfter [
|
||||
(final: prev: {
|
||||
swaylock = final.writeShellScriptBin "swaylock" ''
|
||||
exec ${prev.swaylock}/bin/swaylock \
|
||||
--image ${config.stylix.image} \
|
||||
--scaling fill \
|
||||
--inside-color ${inside} \
|
||||
--inside-clear-color ${inside} \
|
||||
--inside-caps-lock-color ${inside} \
|
||||
--inside-ver-color ${inside} \
|
||||
--inside-wrong-color ${inside} \
|
||||
--key-hl-color ${positive} \
|
||||
--layout-bg-color ${inside} \
|
||||
--layout-border-color ${ring} \
|
||||
--layout-text-color ${text} \
|
||||
--line-uses-inside \
|
||||
--ring-color ${ring} \
|
||||
--ring-clear-color ${negative} \
|
||||
--ring-caps-lock-color ${ring} \
|
||||
--ring-ver-color ${positive} \
|
||||
--ring-wrong-color ${negative} \
|
||||
--separator-color 00000000 \
|
||||
--text-color ${text} \
|
||||
--text-clear-color ${text} \
|
||||
--text-caps-lock-color ${text} \
|
||||
--text-ver-color ${text} \
|
||||
--text-wrong-color ${text} \
|
||||
"$@"
|
||||
'';
|
||||
})
|
||||
];
|
||||
home-manager.sharedModules = [(
|
||||
{ options, ... }:
|
||||
{
|
||||
# See https://github.com/danth/stylix/issues/8#issuecomment-1194484544
|
||||
# This check can be removed when programs.swaylock is in a stable release
|
||||
programs.swaylock.settings = lib.mkIf (options.programs ? swaylock) {
|
||||
image = config.stylix.image;
|
||||
scaling = "fill";
|
||||
inside-color = inside;
|
||||
inside-clear-color = inside;
|
||||
inside-caps-lock-color = inside;
|
||||
inside-ver-color = inside;
|
||||
inside-wrong-color = inside;
|
||||
key-hl-color = positive;
|
||||
layout-bg-color = inside;
|
||||
layout-border-color = ring;
|
||||
layout-text-color = text;
|
||||
line-uses-inside = true;
|
||||
ring-color = ring;
|
||||
ring-clear-color = negative;
|
||||
ring-caps-lock-color = ring;
|
||||
ring-ver-color = positive;
|
||||
ring-wrong-color = negative;
|
||||
separator-color = "00000000";
|
||||
text-color = text;
|
||||
text-clear-color = text;
|
||||
text-caps-lock-color = text;
|
||||
text-ver-color = text;
|
||||
text-wrong-color = text;
|
||||
};
|
||||
}
|
||||
)];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue