-
-
Notifications
You must be signed in to change notification settings - Fork 300
treewide: deprecate manual targets.${target}.useWallpaper.enable options #2084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| { imageScalingMode }: | ||
| { | ||
| programs.regreet.settings.background.fit = lib.mkIf cfg.useWallpaper ( | ||
| programs.regreet.settings.background.fit = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unlike before, this change causes programs.regreet.settings.background.fit to be declared when targets.regreet.image.enable is enabled and targets.regreet.imageScalingMode.enable is disabled. Is this a safe change, assuming upstream should not access the background fitting type when there is no background? Otherwise, this group should be merged with the other { image } group into { image, imageScalingMode }.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like merging them would make more sense, setting the wallpaper scaling but not the wallpaper image seems silly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like merging them would make more sense, setting the wallpaper scaling but not the wallpaper image seems silly.
Yes, but this makes this group artificially more restrictive than necessary. For example, the entire { image, imageScalingMode } group would be disabled when imageScalingMode is disabled, despite image being enabled and desired.
I would say this PR is ready to merge as-is.
7e76229 to
47e1eb9
Compare
Deprecate manual targets.${target}.useWallpaper.enable options with
generated targets.${target}.image.enable options, following commit
953c3fb ("stylix/mk-target: generate options for configuring
safeguarded arguments").
47e1eb9 to
0a2ffb6
Compare
0xda157
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise LGTM
| { imageScalingMode }: | ||
| { | ||
| programs.regreet.settings.background.fit = lib.mkIf cfg.useWallpaper ( | ||
| programs.regreet.settings.background.fit = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like merging them would make more sense, setting the wallpaper scaling but not the wallpaper image seems silly.
trueNAHO
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not tested this code and merely assume this works as expected.
The following tests successfully build:
-
diff --git a/modules/regreet/testbeds/regreet.nix b/modules/regreet/testbeds/regreet.nix index a4ec92ae..618b32fc 100644 --- a/modules/regreet/testbeds/regreet.nix +++ b/modules/regreet/testbeds/regreet.nix @@ -1 +1,4 @@ -{ programs.regreet.enable = true; } +{ + stylix.targets.regreet.useWallpaper = true; + programs.regreet.enable = true; +}
-
diff --git a/modules/regreet/testbeds/regreet.nix b/modules/regreet/testbeds/regreet.nix index a4ec92ae..388498ee 100644 --- a/modules/regreet/testbeds/regreet.nix +++ b/modules/regreet/testbeds/regreet.nix @@ -1 +1,4 @@ -{ programs.regreet.enable = true; } +{ + stylix.targets.regreet.useWallpaper = false; + programs.regreet.enable = true; +}
| { imageScalingMode }: | ||
| { | ||
| programs.regreet.settings.background.fit = lib.mkIf cfg.useWallpaper ( | ||
| programs.regreet.settings.background.fit = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like merging them would make more sense, setting the wallpaper scaling but not the wallpaper image seems silly.
Yes, but this makes this group artificially more restrictive than necessary. For example, the entire { image, imageScalingMode } group would be disabled when imageScalingMode is disabled, despite image being enabled and desired.
I would say this PR is ready to merge as-is.
The following remaining
useWallpaperinstances cannot yet be deprecated because their modules have not yet migrated tomkTarget:I have not tested this code and merely assume this works as expected.This has been tested in #2084 (review).