Fix error when Swaylock module is not available 🐛
See https://github.com/danth/stylix/issues/8#issuecomment-1279723774
This commit is contained in:
parent
78055b3868
commit
7a57dff2b2
1 changed files with 29 additions and 27 deletions
|
|
@ -29,33 +29,35 @@ in {
|
|||
{
|
||||
# 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) ({
|
||||
color = outside;
|
||||
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;
|
||||
} // (if config.stylix.targets.swaylock.useImage then {
|
||||
image = "${config.stylix.image}";
|
||||
} else {} ));
|
||||
config = lib.optionalAttrs (options.programs ? swaylock) {
|
||||
programs.swaylock.settings = {
|
||||
color = outside;
|
||||
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;
|
||||
} // lib.optionalAttrs config.stylix.targets.swaylock.useImage {
|
||||
image = "${config.stylix.image}";
|
||||
};
|
||||
};
|
||||
}
|
||||
)];
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue