6
6
literalExpression escapeShellArg hm getAttrFromPath any optional ;
7
7
8
8
cfg = config . home . pointerCursor ;
9
-
10
- enable = if ( lib . versionOlder config . home . stateVersion "25.05" ) then
11
- # respect .enable if it is declared
12
- if ( any ( x : x ? enable ) options . home . pointerCursor . definitions ) then
13
- cfg . enable
14
- else
15
- cfg != null
16
- else
17
- ( cfg ? enable ) && cfg . enable ;
9
+ opts = options . home . pointerCursor ;
18
10
19
11
pointerCursorModule = types . submodule {
20
12
options = {
@@ -132,10 +124,7 @@ in {
132
124
options = {
133
125
home . pointerCursor = mkOption {
134
126
type = types . nullOr pointerCursorModule ;
135
- default = if ( lib . versionOlder config . home . stateVersion "25.05" ) then
136
- null
137
- else
138
- { } ;
127
+ default = null ;
139
128
description = ''
140
129
Cursor configuration.
141
130
@@ -156,7 +145,13 @@ in {
156
145
} ;
157
146
} ;
158
147
159
- config = mkMerge [
148
+ config = let
149
+ # Check if enable option was explicitly defined by the user
150
+ enableDefined = any ( x : x ? enable ) opts . definitions ;
151
+
152
+ # Determine if cursor configuration should be enabled
153
+ enable = if enableDefined then cfg . enable else cfg != null ;
154
+ in mkMerge [
160
155
( mkIf enable ( mkMerge [
161
156
{
162
157
assertions = [
@@ -242,12 +237,12 @@ in {
242
237
( [ "xsession" "pointerCursor" ] ++ [ x ] ++ [ "isDefined" ] )
243
238
options ) [ "package" "name" "size" "defaultCursor" ] ) ''
244
239
The option `xsession.pointerCursor` has been merged into `home.pointerCursor` and will be removed
245
- in the future. Please change to set `home.pointerCursor` directly and enable `home.pointerCursor.x10 .enable`
246
- to generate x10 specific cursor configurations. You can refer to the documentation for more details.
247
- '' ) ++ ( optional ( ( lib . versionAtLeast config . home . stateVersion "25.05" )
248
- && ( cfg == null ) ) ''
240
+ in the future. Please change to set `home.pointerCursor` directly and enable `home.pointerCursor.x11 .enable`
241
+ to generate x11 specific cursor configurations. You can refer to the documentation for more details.
242
+ '' ) ++ ( optional ( opts . highestPrio != ( lib . mkOptionDefault { } ) . priority
243
+ && cfg == null ) ''
249
244
Setting home.pointerCursor to null is deprecated.
250
- Please update your configuration so that
245
+ Please update your configuration to explicitly set:
251
246
252
247
home.pointerCursor.enable = false;
253
248
'' ) ;
0 commit comments