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

[ENHANCEMENT] Separate software packaging from modifying the user home #2

Open
britter opened this issue Dec 15, 2023 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@britter
Copy link

britter commented Dec 15, 2023

Is your feature request related to a problem? Please describe.

It's great that this project provides support for installing Ultraschall via Nix. However, it looks like it mixes the packaging of the software with installing Ultraschall into the user's home directory. In particular these lines break with the convention of putting things into the nix store and linking them to the target location. The result of that is that when removing the Ultaschall module from a nix system configuration or rolling back to a previous generation, stale folders will be left in the user's home directory.

Describe the solution you'd like
I think an idiomatic solution would look like the following:

  • Create a nix derivation for the individual software components that make up Ultraschall instead of using ultraschall-installer.
  • Possibly contribute them to the nixpkgs repository which will make them easier to discover.
  • Move configuration that modifies the user home to Home Manager.

Describe alternatives you've considered

Additional context

@britter britter added the enhancement New feature or request label Dec 15, 2023
@fernsehmuell
Copy link
Collaborator

Thanks for the input. I changed a lot in this feature branch: https://github.com/Ultraschall/ultraschall-nix/tree/feature/configfile37c3editon but it is still work in progress.
I linked all static binaries to the nix-store. The lua scripts will be a copy, because they should be editable by design. When everything is working i plan to put it into nixpkgs. Maybe a nixos-module, but i see no benefit for that at the moment.

@britter
Copy link
Author

britter commented Jan 16, 2024

Hey @fernsehmuell! Thank you for the answer. I've been working on this myself in my nix-configuration repository: britter/nix-configuration@main...bene/ultraschall. My approach is a little bit different though. From what I can see you're using the ultraschall installer to get all the binaries? What I've done is trying to package all required components using nix starting with studio-link. Unfortunately studio-link seems to use quite outdated third party libraries (libre, librem, baresip) and also patches them. For that reason I had to rewirte these modules instead of using them from nixpkgs. I'm at the point where I'm able to build the studio-link reaper plugin (overlay-vst) and am working now on the onair plugin (overlay-onair-lv2).

Regarding installation: I still believe this should be done by home-manager and it should be linked from the nix store into the user home. The reason for this is that there is tooling for NixOS that will break the Ultraschall installation if it copies stuff into the user home, such as Impermance. Regarding editable lua files: that would need to be modeled in the home-manager module for ultraschall.

Regarding submitting this to nixpkgs: I was thinking about contributing what I've done in terms of packaging studio-link and also Ultraschall soundboard, as soon as I get to it. This is a prerequisite for creating a home-manager module on top of it.

I don't see how a NixOS Module would help with any of this as these modules are supposed to configure system wide things like systemd units, an ultraschall clearly needs to be installed on a per-user basis (hence my proposal to go with home-manager).

Anyway, let's keep each others in the loop about this! I will let you know once I get everything working on my end.

@fernsehmuell
Copy link
Collaborator

Nice, i am not a fan of building stuff at two places, and normally we update Ultraschall not very often. We have no time and energy to support too many unknowns like different libs etc. That’s why there is one blob of files and one pinned version of reaper. I know that this is not the nixos way. But let’s talk about that in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants