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

vault: add ui #42614

Closed
bricewge opened this issue Jun 26, 2018 · 9 comments
Closed

vault: add ui #42614

bricewge opened this issue Jun 26, 2018 · 9 comments

Comments

@bricewge
Copy link
Contributor

Since version 0.10.0 vault has a web ui which need yarn to be build. It looks like the derivation need to use yarn2nix but I can't wrap my head around how to do this inside this derivation. I didn't found any examples on doing this either.

Any help or orientation on how to achieve this is welcome.
This issue seems similar to #41378: træfik is written in go and also need yarn to build it's web ui.

@zimbatm
Copy link
Member

zimbatm commented Dec 5, 2018

related PR: #49082

@arianvp
Copy link
Member

arianvp commented Mar 21, 2019

I have a solution in that PR that works, but we decided not to merge it into nixpkgs because the yarn dependencies would add too much 'bloat' to nixpkgs.

I wonder how we should handle this in the future, as more and more projects seem to bundle a JS web-ui these days, and building those with a fixed set of npm packages in nixpkgs is basically impossible.

Does the code in #49082 answer your question @bricewge because in that case we can close this.

@bricewge
Copy link
Contributor Author

bricewge commented Mar 21, 2019

I have read your issues and PRs about JS assets a week or so ago. Thanks to you I know how to bundle such a package now.

However I'm quite saddened by the answers on both sides of the aisle. Upstream don't want to vendor in the assets for vault despite the fact that the organization that manage it, HashiCorp, does it for a similar project: counsul. And here we can't merge your PR because it's too bloated... This situation frustrate me because it looks like we will never get the web-ui for those kind of packages in NixOS when upstream don't want to compromise.

Writing this comment just made me realize that we didn't ask upstream to make available the compiled assets archive for each release, as Mic92 asked. Maybe it's the way to go since it won't bloat either of the git repo.

Anyway I don't think this issue should be closed because it's not resolved.

@zimbatm
Copy link
Member

zimbatm commented Mar 21, 2019

Writing this comment just made me realize that we didn't ask upstream to make available the compiled assets archive for each release, as Mic92 asked. Maybe it's the way to go since it won't bloat either of the git repo.

That's the best option really.

Another option is to create your own nixpkgs overlay for that type of packages. We have a few overlays appearing already, like nixpkgs-wayland.

@yorickvP
Copy link
Contributor

yorickvP commented May 7, 2019

Our current solution is https://github.com/obfusk/nix-vault-with-ui, which uses the hashes from yarn.lock to build the UI in the nix sandbox.

@PsyanticY
Copy link
Contributor

There is also the possibility to use vault-binary that includes the UI ( package)

@arianvp
Copy link
Member

arianvp commented Sep 13, 2019

Given that this is now packaged, can we close this?

@Zhen-hao
Copy link

Zhen-hao commented Jan 2, 2020

@PsyanticY thanks for the work!
How can I get services.vault to use this vault-binary?

@PsyanticY
Copy link
Contributor

use services.vault.package = pkgs.vault-bin;

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

No branches or pull requests

6 participants