Skip to content

Conversation

@bmrips
Copy link
Contributor

@bmrips bmrips commented Oct 28, 2025

Description

The description of xdg.portal.enable that certain paths need to be added to NixOS' environment.pathsToLink option when Home Manager is installed as a submodule and home-manager.useUserPackages is enabled. This PR adds precisely this check as an assertion.

Checklist

  • Change is backwards compatible.

  • Code formatted with nix fmt or
    nix-shell -p treefmt nixfmt deadnix keep-sorted --run treefmt.

  • Code tested through nix run .#tests -- test-all or
    nix-shell --pure tests -A run.all.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.
    • Generate a news entry. See News
    • Basic tests added. See Tests
  • If this PR adds an exciting new feature or contains a breaking change.

    • Generate a news entry. See News

@home-manager-ci home-manager-ci bot requested a review from Misterio77 October 28, 2025 21:36
@bmrips
Copy link
Contributor Author

bmrips commented Oct 29, 2025

I just found out that, instead of pointing out the problem, we can also fix it automatically, as I implemented here. However, I am not sure whether this is modification to the NixOS configuration might be too 'invasive'. @khaneliman can you give me some advice on this matter?

@khaneliman
Copy link
Collaborator

I just found out that, instead of pointing out the problem, we can also fix it automatically, as I implemented here. However, I am not sure whether this is modification to the NixOS configuration might be too 'invasive'. @khaneliman can you give me some advice on this matter?

Yeah, I generally prefer a warning/assertion over magically enabling something. But, we can also offer an integration option or a toggle that allows someone to get the extra configuration by "allowing" or "opting in" to the change.

@bmrips bmrips force-pushed the xdg-portal-on-nixos-assertion branch from ad2f17f to 95a2f57 Compare October 29, 2025 07:41
@bmrips
Copy link
Contributor Author

bmrips commented Oct 29, 2025

Like so? 200599c

@khaneliman
Copy link
Collaborator

Like so? 200599c

I'm having second thoughts lol. just wondering if it blurs the line between nixos module and home-manager responsibilities.

This would then open the door for other modules to just add their own NixOS configurations to the nixos module and I don't know if I want to set that precedent...

@rycee @ambroisie any thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants