From dba4bd2d89450fac0295581f795ea9757921f695 Mon Sep 17 00:00:00 2001
From: NAHO <90870942+trueNAHO@users.noreply.github.com>
Date: Tue, 20 Aug 2024 15:56:54 +0200
Subject: [PATCH 1/2] treewide: declare end-of-life for deprecated options
Fixes: 6858d08ed012 ("treewide: add soft deprecation dates (#506)")
Link: https://github.com/danth/stylix/pull/514
---
modules/nixvim/nixvim.nix | 29 +++++++++++++-----
stylix/palette.nix | 63 ++++++++++-----------------------------
2 files changed, 37 insertions(+), 55 deletions(-)
diff --git a/modules/nixvim/nixvim.nix b/modules/nixvim/nixvim.nix
index dbc1da66..2c7c8a0f 100644
--- a/modules/nixvim/nixvim.nix
+++ b/modules/nixvim/nixvim.nix
@@ -14,15 +14,28 @@
};
imports = [
- # Added: 2024-08-06
- (lib.mkRenamedOptionModule
- [ "stylix" "targets" "nixvim" "transparent_bg" "main" ]
- [ "stylix" "targets" "nixvim" "transparentBackground" "main" ])
+ (
+ lib.mkRenamedOptionModuleWith {
+ from = [ "stylix" "targets" "nixvim" "transparent_bg" "main" ];
+ sinceRelease = 2411;
+ to = [ "stylix" "targets" "nixvim" "transparentBackground" "main" ];
+ }
+ )
- # Added: 2024-08-06
- (lib.mkRenamedOptionModule
- [ "stylix" "targets" "nixvim" "transparent_bg" "sign_column" ]
- [ "stylix" "targets" "nixvim" "transparentBackground" "signColumn" ])
+ (
+ lib.mkRenamedOptionModuleWith {
+ from = [ "stylix" "targets" "nixvim" "transparent_bg" "sign_column" ];
+ sinceRelease = 2411;
+
+ to = [
+ "stylix"
+ "targets"
+ "nixvim"
+ "transparentBackground"
+ "signColumn"
+ ];
+ }
+ )
];
config = lib.mkIf (config.stylix.enable && config.stylix.targets.nixvim.enable && (config.programs ? nixvim)) (
diff --git a/stylix/palette.nix b/stylix/palette.nix
index a6ae3da1..2b5e748a 100644
--- a/stylix/palette.nix
+++ b/stylix/palette.nix
@@ -23,53 +23,22 @@ let
in {
# TODO link to doc on how to do instead
imports = [
- # Added: 2023-02-02
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base00" ] "Using stylix.palette to override scheme is not supported anymore")
-
- # Added: 2023-02-02
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base01" ] "Using stylix.palette to override scheme is not supported anymore")
-
- # Added: 2023-02-02
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base02" ] "Using stylix.palette to override scheme is not supported anymore")
-
- # Added: 2023-02-02
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base03" ] "Using stylix.palette to override scheme is not supported anymore")
-
- # Added: 2023-02-02
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base04" ] "Using stylix.palette to override scheme is not supported anymore")
-
- # Added: 2023-02-02
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base05" ] "Using stylix.palette to override scheme is not supported anymore")
-
- # Added: 2023-02-02
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base06" ] "Using stylix.palette to override scheme is not supported anymore")
-
- # Added: 2023-02-02
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base07" ] "Using stylix.palette to override scheme is not supported anymore")
-
- # Added: 2023-02-02
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base08" ] "Using stylix.palette to override scheme is not supported anymore")
-
- # Added: 2023-02-02
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base09" ] "Using stylix.palette to override scheme is not supported anymore")
-
- # Added: 2023-02-02
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base0A" ] "Using stylix.palette to override scheme is not supported anymore")
-
- # Added: 2023-02-02
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base0B" ] "Using stylix.palette to override scheme is not supported anymore")
-
- # Added: 2023-02-02
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base0C" ] "Using stylix.palette to override scheme is not supported anymore")
-
- # Added: 2023-02-02
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base0D" ] "Using stylix.palette to override scheme is not supported anymore")
-
- # Added: 2023-02-02
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base0E" ] "Using stylix.palette to override scheme is not supported anymore")
-
- # Added: 2023-02-02
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base0F" ] "Using stylix.palette to override scheme is not supported anymore")
+ (lib.mkRemovedOptionModule [ "stylix" "palette" "base00" ] "Using stylix.palette to override scheme is not supported since 23.05")
+ (lib.mkRemovedOptionModule [ "stylix" "palette" "base01" ] "Using stylix.palette to override scheme is not supported since 23.05")
+ (lib.mkRemovedOptionModule [ "stylix" "palette" "base02" ] "Using stylix.palette to override scheme is not supported since 23.05")
+ (lib.mkRemovedOptionModule [ "stylix" "palette" "base03" ] "Using stylix.palette to override scheme is not supported since 23.05")
+ (lib.mkRemovedOptionModule [ "stylix" "palette" "base04" ] "Using stylix.palette to override scheme is not supported since 23.05")
+ (lib.mkRemovedOptionModule [ "stylix" "palette" "base05" ] "Using stylix.palette to override scheme is not supported since 23.05")
+ (lib.mkRemovedOptionModule [ "stylix" "palette" "base06" ] "Using stylix.palette to override scheme is not supported since 23.05")
+ (lib.mkRemovedOptionModule [ "stylix" "palette" "base07" ] "Using stylix.palette to override scheme is not supported since 23.05")
+ (lib.mkRemovedOptionModule [ "stylix" "palette" "base08" ] "Using stylix.palette to override scheme is not supported since 23.05")
+ (lib.mkRemovedOptionModule [ "stylix" "palette" "base09" ] "Using stylix.palette to override scheme is not supported since 23.05")
+ (lib.mkRemovedOptionModule [ "stylix" "palette" "base0A" ] "Using stylix.palette to override scheme is not supported since 23.05")
+ (lib.mkRemovedOptionModule [ "stylix" "palette" "base0B" ] "Using stylix.palette to override scheme is not supported since 23.05")
+ (lib.mkRemovedOptionModule [ "stylix" "palette" "base0C" ] "Using stylix.palette to override scheme is not supported since 23.05")
+ (lib.mkRemovedOptionModule [ "stylix" "palette" "base0D" ] "Using stylix.palette to override scheme is not supported since 23.05")
+ (lib.mkRemovedOptionModule [ "stylix" "palette" "base0E" ] "Using stylix.palette to override scheme is not supported since 23.05")
+ (lib.mkRemovedOptionModule [ "stylix" "palette" "base0F" ] "Using stylix.palette to override scheme is not supported since 23.05")
];
options.stylix = {
From 4b15fdcc875dac45c37a7bc79d49a3e9a3062ac7 Mon Sep 17 00:00:00 2001
From: NAHO <90870942+trueNAHO@users.noreply.github.com>
Date: Tue, 20 Aug 2024 16:05:41 +0200
Subject: [PATCH 2/2] stylix: remove deprecated 'stylix.palette.' options
at end-of-life
BREAKING CHANGE: Remove the deprecated 'stylix.palette.' options.
Link: https://github.com/danth/stylix/pull/514
---
stylix/palette.nix | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/stylix/palette.nix b/stylix/palette.nix
index 2b5e748a..7fe9600a 100644
--- a/stylix/palette.nix
+++ b/stylix/palette.nix
@@ -21,26 +21,6 @@ let
generatedScheme = lib.importJSON paletteJSON;
in {
- # TODO link to doc on how to do instead
- imports = [
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base00" ] "Using stylix.palette to override scheme is not supported since 23.05")
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base01" ] "Using stylix.palette to override scheme is not supported since 23.05")
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base02" ] "Using stylix.palette to override scheme is not supported since 23.05")
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base03" ] "Using stylix.palette to override scheme is not supported since 23.05")
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base04" ] "Using stylix.palette to override scheme is not supported since 23.05")
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base05" ] "Using stylix.palette to override scheme is not supported since 23.05")
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base06" ] "Using stylix.palette to override scheme is not supported since 23.05")
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base07" ] "Using stylix.palette to override scheme is not supported since 23.05")
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base08" ] "Using stylix.palette to override scheme is not supported since 23.05")
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base09" ] "Using stylix.palette to override scheme is not supported since 23.05")
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base0A" ] "Using stylix.palette to override scheme is not supported since 23.05")
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base0B" ] "Using stylix.palette to override scheme is not supported since 23.05")
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base0C" ] "Using stylix.palette to override scheme is not supported since 23.05")
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base0D" ] "Using stylix.palette to override scheme is not supported since 23.05")
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base0E" ] "Using stylix.palette to override scheme is not supported since 23.05")
- (lib.mkRemovedOptionModule [ "stylix" "palette" "base0F" ] "Using stylix.palette to override scheme is not supported since 23.05")
- ];
-
options.stylix = {
polarity = lib.mkOption {
type = lib.types.enum [ "either" "light" "dark" ];