swaylock: remove optionalAttrs (#420)

This commit is contained in:
Daniel Thwaites 2024-06-11 17:15:52 +01:00 committed by GitHub
parent f060e4059b
commit e59d2c1725
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -23,10 +23,7 @@ in {
};
};
config = lib.mkIf (config.stylix.enable && config.stylix.targets.swaylock.enable && pkgs.stdenv.hostPlatform.isLinux)
# See https://github.com/danth/stylix/issues/8#issuecomment-1194484544
# This check can be removed when programs.swaylock is in a stable release
(lib.optionalAttrs (options.programs ? swaylock) {
config = lib.mkIf (config.stylix.enable && config.stylix.targets.swaylock.enable && pkgs.stdenv.hostPlatform.isLinux) {
programs.swaylock.settings = {
color = outside;
scaling = "fill";
@ -54,5 +51,5 @@ in {
} // lib.optionalAttrs config.stylix.targets.swaylock.useImage {
image = "${config.stylix.image}";
};
});
};
}