Skip to content
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

Nix: corrections for overlays, overrideable systems #75

Merged
merged 4 commits into from
Aug 9, 2023

Conversation

spikespaz
Copy link
Contributor

@spikespaz spikespaz commented Aug 9, 2023

  1. The nix fmt command did not work for me so I have reverted it to use legacyPackages for simplicity. It works now.
  2. Before there was one default overlay, which would make it hard to get individual packages out from the overlay. Would need an extra wrapper function. Now each package has its own overlay, while default combines them all. Brought in mkJoinedOverlays from the Hyprland flake.
    • $ nix eval 'path:.#overlays' --apply 'builtins.attrNames'
      [ "default" "hyprland-share-picker" "xdg-desktop-portal-hyprland" ]
  3. Moved version into nix/overlays.nix.
    • Perhaps we should adopt my (unpublished) changes from Alexays/Waybar and pull the first version fragment from meson.build.
  4. Added another input nix-systems so that the systems is overrideable. I like this much better than using flake-utils or flake-parts.
  5. The attributes of the packages output are inherited from internal pkgsFor, which contains all of the overlays pre-applied.
    • $ nix eval 'path:.#packages.x86_64-linux' --apply 'builtins.attrNames'
      [ "default" "hyprland-share-picker" "xdg-desktop-portal-hyprland" ]

@spikespaz
Copy link
Contributor Author

@fufexan I am conflicted about the naming of the xdph overlay. I like that it is shorter as xdph, and it is unique enough that there should be low chance of conflict. On the other hand, it is inconsistent with the name of the package. What is your opinion? Should the xdph overlay be renamed to match the xdg-desktop-portal-hyprland package name?

@fufexan
Copy link
Member

fufexan commented Aug 9, 2023

Sure, let's use the full name.

@spikespaz
Copy link
Contributor Author

Sure, let's use the full name.

Should share-picker also be hyprland-share-picker or xdph-share-picker?

@spikespaz
Copy link
Contributor Author

I have renamed both names for both packages and overlays:

$ nix eval 'path:.#overlays' --apply 'builtins.attrNames'
[ "default" "hyprland-share-picker" "xdg-desktop-portal-hyprland" ]

$ nix eval 'path:.#packages.x86_64-linux' --apply 'builtins.attrNames'
[ "default" "hyprland-share-picker" "xdg-desktop-portal-hyprland" ]

@spikespaz spikespaz force-pushed the nix-granular-overlays branch 2 times, most recently from 791a4ba to d72ecc9 Compare August 9, 2023 21:00
@fufexan
Copy link
Member

fufexan commented Aug 9, 2023

Do we need to separate xdph and the picker in different overlays though?

@spikespaz
Copy link
Contributor Author

Do we need to separate xdph and the picker in different overlays though?

It would be nice to do, just in case someone (me) wants to specify their own overlay for one or the other. I was doing this because for hyprland-flake specifically, which has a default overlay, I was having a hard time determining what overlays to join as default. If they have separate names this becomes much easier rather than relying on upstream repositories to always keep the same outputs.

IMO it doesn't matter much, but is nice to have when needed. Saves me some code, and thinking.

@spikespaz
Copy link
Contributor Author

Once this is merged I will update the other three flakes accordingly. End-users will have to use the new name hyprland-share-picker from the packages output instead of share-picker.

nix/overlays.nix Outdated Show resolved Hide resolved
@fufexan fufexan merged commit 9257b0c into hyprwm:master Aug 9, 2023
1 check passed
@spikespaz spikespaz changed the title Nix: Some corrections for overlays Nix: corrections for overlays, overrideable systems Aug 11, 2023
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.

None yet

2 participants