Skip to content

Conversation

@trueNAHO
Copy link
Member

@trueNAHO trueNAHO commented Dec 10, 2025

Deprecate manual targets.${target}.useWallpaper.enable options with
generated targets.${target}.image.enable options, following commit
953c3fb01e2a ("stylix/mk-target: generate options for configuring
safeguarded arguments").

The following remaining useWallpaper instances cannot yet be deprecated because their modules have not yet migrated to mkTarget:

$ rg --files-with-matches 'useWallpaper ='
modules/grub/nixos.nix
modules/kde/hm.nix
modules/sway/hm.nix

I have not tested this code and merely assume this works as expected. This has been tested in #2084 (review).


@trueNAHO trueNAHO added the backport: release-25.11 To be backported to the release-25.11 stable branch label Dec 10, 2025
@stylix-automation stylix-automation bot added topic: nixos NixOS target topic: home-manager Home Manager target topic: modules /modules/ subsystem labels Dec 10, 2025
{ imageScalingMode }:
{
programs.regreet.settings.background.fit = lib.mkIf cfg.useWallpaper (
programs.regreet.settings.background.fit =
Copy link
Member Author

@trueNAHO trueNAHO Dec 10, 2025

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 }.

Copy link
Contributor

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.

Copy link
Member Author

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.

@trueNAHO trueNAHO mentioned this pull request Dec 10, 2025
6 tasks
@trueNAHO trueNAHO force-pushed the treewide-deprecate-manual-targets-target-use-wallpaper-enable-options branch from 7e76229 to 47e1eb9 Compare December 10, 2025 23:05
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").
@trueNAHO trueNAHO force-pushed the treewide-deprecate-manual-targets-target-use-wallpaper-enable-options branch from 47e1eb9 to 0a2ffb6 Compare December 10, 2025 23:10
Copy link
Contributor

@0xda157 0xda157 left a 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 =
Copy link
Contributor

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.

Copy link
Member Author

@trueNAHO trueNAHO left a 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 =
Copy link
Member Author

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.

@trueNAHO trueNAHO requested a review from 0xda157 January 11, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport: release-25.11 To be backported to the release-25.11 stable branch topic: home-manager Home Manager target topic: modules /modules/ subsystem topic: nixos NixOS target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants