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

goldwarden: init at 0.2.7 #278362

Merged
merged 1 commit into from
Jan 4, 2024
Merged

goldwarden: init at 0.2.7 #278362

merged 1 commit into from
Jan 4, 2024

Conversation

arthsmn
Copy link
Member

@arthsmn arthsmn commented Jan 2, 2024

Description of changes

Homepage: https://github.com/quexten/goldwarden
Closes: #278180

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@arthsmn
Copy link
Member Author

arthsmn commented Jan 2, 2024

@quexten I looked at the aur package and it only seems to install a binary and a polkit rule, that's what is being done here. Are there any other steps needed in the package?

@quexten
Copy link

quexten commented Jan 2, 2024

If selinux is present (does nix have it?), the polkit rule's permissions need to be adjusted as well. Other than that no, it's just installing the binary.

Do beware that you do need at least dbus, and a pinentry client (https://pkg.go.dev/github.com/twpayne/go-pinentry#section-readme) are required to use the package. I'm not sure if these are present on a default nixos installation.

@quexten
Copy link

quexten commented Jan 2, 2024

Oh, since I do see darwin listed above, I will note that while packages are built for darwin in the project's GitHub CI at the moment, they are very much untested and some features are missing. I'm not sure they should be released for darwin just yet until more testing has been done there. quexten/goldwarden#4

@arthsmn
Copy link
Member Author

arthsmn commented Jan 2, 2024

Oh, since I do see darwin listed above, I will note that while packages are built for darwin in the project's GitHub CI at the moment, they are very much untested and some features are missing. I'm not sure they should be released for darwin just yet until more testing has been done there. quexten/goldwarden#4

Understood, I'll mark it as linux-only and link the issue.

@arthsmn arthsmn force-pushed the goldwarden branch 2 times, most recently from 951c003 to 91d7d71 Compare January 2, 2024 22:33
@arthsmn
Copy link
Member Author

arthsmn commented Jan 2, 2024

If selinux is present (does nix have it?), the polkit rule's permissions need to be adjusted as well. Other than that no, it's just installing the binary.

Do beware that you do need at least dbus, and a pinentry client (https://pkg.go.dev/github.com/twpayne/go-pinentry#section-readme) are required to use the package. I'm not sure if these are present on a default nixos installation.

No, we currently don't support SELinux.

I added the packages to the binary's path, so they'll always be there.

@arthsmn arthsmn force-pushed the goldwarden branch 2 times, most recently from 6aa91fe to a125b09 Compare January 2, 2024 23:03
pkgs/by-name/go/goldwarden/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/go/goldwarden/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/go/goldwarden/package.nix Show resolved Hide resolved
pkgs/by-name/go/goldwarden/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/go/goldwarden/package.nix Outdated Show resolved Hide resolved
@arthsmn arthsmn force-pushed the goldwarden branch 2 times, most recently from f428548 to 48f4801 Compare January 2, 2024 23:37
@arthsmn arthsmn requested a review from eclairevoyant January 2, 2024 23:38
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 11.by: package-maintainer This PR was created by the maintainer of the package it changes labels Jan 3, 2024
@eclairevoyant eclairevoyant added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Jan 4, 2024
@wegank wegank merged commit 958a633 into NixOS:master Jan 4, 2024
23 checks passed
@arthsmn arthsmn deleted the goldwarden branch January 4, 2024 23:12
@symphorien
Copy link
Member

I think the required system services should be directly be installed in the package or setup by a NixOS module. The imperative setup commands don't fit NixOS very well.

@arthsmn
Copy link
Member Author

arthsmn commented Jan 7, 2024

I think the required system services should be directly be installed in the package or setup by a NixOS module. The imperative setup commands don't fit NixOS very well.

I couldn't find the required file, so I think it is generated at runtime. @quexten what do you think? Do you have plans to have a preset file so we can copy from? Do you want to have a hardcoded file or let upstream handle the service? Keep in mind that it would be desirable to have a service in NixOS in case your app gets options to be enabled etc.

@quexten
Copy link

quexten commented Jan 7, 2024

For the other packaging formats I have the upstream issue quexten/goldwarden#12, which I have not been able to deal with just yet. For now, the service file is a hard-coded string https://github.com/quexten/goldwarden/blob/e15cee5aa92749b395960498dd069b8794025e68/cmd/setup_linux.go#L69-L77, but if it helps you, I can make this a dedicated file upstream that you can just use. This is installed as a user-service.

@arthsmn
Copy link
Member Author

arthsmn commented Jan 7, 2024

For the other packaging formats I have the upstream issue quexten/goldwarden#12, which I have not been able to deal with just yet. For now, the service file is a hard-coded string https://github.com/quexten/goldwarden/blob/e15cee5aa92749b395960498dd069b8794025e68/cmd/setup_linux.go#L69-L77, but if it helps you, I can make this a dedicated file upstream that you can just use. This is installed as a user-service.

This would be awesome! Thanks!

@quexten quexten mentioned this pull request Mar 12, 2024
@nomeata
Copy link
Contributor

nomeata commented Mar 25, 2024

I gave this a try, but it would never show a pinentry for me, even after I added pinentry-gtk2 to the system packages. (Maybe I should have restarted or at least re-logged-in?)

But somehow the journal log says

Mär 25 21:21:11 riviera .goldwarden-wrapped[2553526]: [INF] [21:21] [Goldwarden > Pinentry] >>> Asking for pin |Unlock Goldwarden|Enter the vault PIN|

without any indication that it couldn’t fin a pinenry or so?

Maybe the package should have a suitable pinentry as a runtime dependency so that it will work for everyone? Not sure.

@quexten
Copy link

quexten commented Mar 25, 2024

Probably a good idea. Upstream has a GTK based custom pinentry fallback for the UI, which is currently only available as a Flatpak, but @SuperSandro2000 is looking into packaging the full UI version without flatpak for nix which would also have this fallback: #293117

@nomeata
Copy link
Contributor

nomeata commented Mar 25, 2024

Yeah, just found that PR and saw it installs config.programs.gnupg.agent.pinentryPackage. I guess I will wait for that PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12.approvals: 1 This PR was reviewed and approved by one reputable person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package request: goldwarden
6 participants