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

add nix flake for gnome extensions #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rcambrj
Copy link

@rcambrj rcambrj commented Jan 3, 2025

Adds flake.nix which exposes two packages for installation on NixOS:

  • the gnome extension for gnome < 45
  • the gnome extension for gnome >= 45

The fusuma package is already available in nixpkgs, but there is no package available for the gnome extension(s).

nixpkgs is where the bulk of NixOS packages live, but packages can be made available from any repository just as this pull request does.

Also in this pull request:

  • a devshell which makes dev tooling available (ruby and libyaml)
  • Gemfile.lock, as is best practice and required for the nix derivation

The >=45 and <45 derivations could be modularised for reuse, but I figured that the >=45 one might change whereas the <45 one will likely stay the same.

You can see an example of how I've implemented this using home-manager's fusuma service:

https://github.com/rcambrj/dotfiles/blob/b3108d9ae608e2e20eacb318c541b03aa470bd40/flake.nix#L45
https://github.com/rcambrj/dotfiles/blob/b3108d9ae608e2e20eacb318c541b03aa470bd40/hosts/mango/graphical/touchpad.nix
https://github.com/rcambrj/dotfiles/blob/b3108d9ae608e2e20eacb318c541b03aa470bd40/modules/home/rcambrj-graphical/touchpad.nix

I've also done a similar thing with the fusuma package.

@rcambrj rcambrj mentioned this pull request Jan 3, 2025
3 tasks
@iberianpig
Copy link
Owner

@rcambrj Thank you for your contribution and efforts in this PR.

While I am not currently considering maintaining nix-flakes within this project, I am curious about an alternative approach. If the GNOME extension were to be published on a platform like https://extensions.gnome.org/, would this potentially make it easier for nix users to configure and use the extension compared to the current setup?

Your insights on this would be greatly appreciated.

Additionally, I am considering notifying users about the necessity of installing the GNOME extension depending on their GNOME version (below 41).

@rcambrj
Copy link
Author

rcambrj commented Jan 6, 2025

@iberianpig nixpkgs has a system in place for gnome extensions which live on extensions.gnome.org. So I think that the answer to your question is yes, it would be easier.

Please also consider that, in this pull request, I amended the compatible gnome versions in metadata.json. It seems to work fine on gnome 47 without changes.

If indeed you do close this pull request without merging, nix users can use this plugin with inputs.fusuma-plugin-appmatcher.url = "github:rcambrj/fusuma-plugin-appmatcher";

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