diff --git a/modules/nixvim/nixvim.nix b/modules/nixvim/nixvim.nix index 050e7f857..d16a23856 100644 --- a/modules/nixvim/nixvim.nix +++ b/modules/nixvim/nixvim.nix @@ -7,12 +7,21 @@ options.stylix.targets.nixvim = { enable = config.lib.stylix.mkEnableTarget "nixvim" true; - transparent_bg = { + transparentBackground = { main = lib.mkEnableOption "background transparency for the main NeoVim window"; - sign_column = lib.mkEnableOption "background transparency for the NeoVim sign column"; + signColumn = lib.mkEnableOption "background transparency for the NeoVim sign column"; }; }; + imports = [ + (lib.mkRenamedOptionModule + [ "stylix" "targets" "nixvim" "transparent_bg" "main" ] + [ "stylix" "targets" "nixvim" "transparentBackground" "main" ]) + (lib.mkRenamedOptionModule + [ "stylix" "targets" "nixvim" "transparent_bg" "sign_column" ] + [ "stylix" "targets" "nixvim" "transparentBackground" "signColumn" ]) + ]; + config = lib.mkIf (config.stylix.enable && config.stylix.targets.nixvim.enable && (config.programs ? nixvim)) ( lib.optionalAttrs (builtins.hasAttr "nixvim" options.programs) { programs.nixvim = { @@ -33,9 +42,9 @@ ctermbg = "none"; }; in { - Normal = lib.mkIf cfg.transparent_bg.main transparent; - NonText = lib.mkIf cfg.transparent_bg.main transparent; - SignColumn = lib.mkIf cfg.transparent_bg.sign_column transparent; + Normal = lib.mkIf cfg.transparentBackground.main transparent; + NonText = lib.mkIf cfg.transparentBackground.main transparent; + SignColumn = lib.mkIf cfg.transparentBackground.signColumn transparent; }; }; }