Skip to content

feat(flake): substituters#13519

Open
Malix-Labs wants to merge 1 commit intohyprwm:mainfrom
Malix-Labs:patch-1
Open

feat(flake): substituters#13519
Malix-Labs wants to merge 1 commit intohyprwm:mainfrom
Malix-Labs:patch-1

Conversation

@Malix-Labs
Copy link
Copy Markdown

@Malix-Labs Malix-Labs commented Mar 2, 2026

Describe your PR, what does it fix/add?

feature native substituters suggestion / hint to flake.nix

image

This will also be shown in flake.nix importing this flake

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

No

Is it ready for merging, or does it need work?

Yes

References

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 2, 2026

Hello and thank you for making a PR to Hyprland!

Please check the PR Guidelines and make sure your PR follows them.
It will make the entire review process faster. :)

If your code can be tested, please always add tests. See more here.

beep boop, I'm just a bot. A real human will review your PR soon.

@fufexan
Copy link
Copy Markdown
Member

fufexan commented Mar 3, 2026

I'm generally against using nixConfig as upstream Nix does not have a way to ignore it, and forces you to interact. Lix ignores it by default, but not everyone uses it.

The benefits would be minimal, as I don't think anyone runs hyprland with nix run from the flake that often.

@Malix-Labs
Copy link
Copy Markdown
Author

Malix-Labs commented Mar 3, 2026

As upstream Nix does not have a way to ignore it

Yes this is true,
Is not being able to ignore the sustituters hint an issue?

The benefits would be minimal, as I don't think anyone runs hyprland with nix run from the flake that often.

It would also hint for imperatively adding the keys to nix.conf permanently when you use hyprland as a flake input of a nixos system (and make sure users are aware of the cache)

@fufexan
Copy link
Copy Markdown
Member

fufexan commented Mar 5, 2026

Is not being able to ignore the sustituters hint an issue?

I've heard people complain about it ever since nixConfig got introduced. I personally don't mind since I use Lix. We could add it and remove it afterwards if people complain.

It would also hint for imperatively adding the keys to nix.conf permanently when you use hyprland as a flake input of a nixos system (and make sure users are aware of the cache)

Right, more visibility doesn't hurt.

@NotAShelf thoughts?

@NotAShelf
Copy link
Copy Markdown
Member

As I've previously written I'm not very fond of the nixConfig option, and I don't consider Cachix a trusted party anymore. If anything, I'm against adding it to the Nix flake itself. Most, if not all, Nix users know how to use a substituters.

@Malix-Labs
Copy link
Copy Markdown
Author

#13519 (comment) from @NotAShelf :

I don't consider Cachix a trusted party anymore

Do you have something written somewhere about that?

The official binary cache of hyprland has been Cachix for as much as I can remember I think

Most, if not all, Nix users know how to use a substituters

I would tend to agree, but having an official binary cache itself be set in the upstream flake and enabled at the same time as adding the flake input instead of having to duplicate it elsewhere in downstream's nix configs is arguably a small QoL enhancement

@NotAShelf
Copy link
Copy Markdown
Member

#13519 (comment) from @NotAShelf :

I don't consider Cachix a trusted party anymore

Do you have something written somewhere about that?

The official binary cache of hyprland has been Cachix for as much as I can remember I think

Most, if not all, Nix users know how to use a substituters

I would tend to agree, but having an official binary cache itself be set in the upstream flake and enabled at the same time as adding the flake input instead of having to duplicate it elsewhere in downstream's nix configs is arguably a small QoL enhancement

No, I haven't written about it yet but not a while ago the CEO of Cachix (or whatever his official position is) has abused his committer privileges on Nixpkgs to discard a change that inconveniences his company. This tells me a lot about where the interests of a particular entity lies, and as such, I trust it untrusted. For the scope of something as potentially dangerous as nixConfig, cachix lists quite high in my to-avoid list.

I also don't quite see the benefit of taking this risk. It's too small of a QoL improvement; most users that will end up developing Hyprland on NixOS will already have the Cachix added to their system substituters, so this makes so very little sense to me. That said, I don't have a concrete stance against it. If there's agreement that it is worth the risk then go ahead.

@Malix-Labs
Copy link
Copy Markdown
Author

#13519 (comment) from @NotAShelf :

I also don't quite see the benefit of taking this risk. It's too small of a QoL improvement; most users that will end up developing Hyprland on NixOS will already have the Cachix added to their system substituters, so this makes so very little sense to me

Wouldn't it also benefits all users of hyprland importing it using a flake input in their nixos configuration?

@NotAShelf
Copy link
Copy Markdown
Member

NotAShelf commented Mar 5, 2026

No, that is not how nixConfig works. It only adds the substituters for nix3 commands. To adjust substituters for configs, you'd have to add substituters to the NixOS module and thus modify the actual system config. I find this equally undesirable.

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.

3 participants