Skip to content

browserpass: add module#16

Merged
dermetfan merged 4 commits into
nix-community:masterfrom
dermetfan:browserpass
Jun 30, 2017
Merged

browserpass: add module#16
dermetfan merged 4 commits into
nix-community:masterfrom
dermetfan:browserpass

Conversation

@dermetfan
Copy link
Copy Markdown
Collaborator

@dermetfan dermetfan commented Jun 9, 2017

A module that installs the host application required by the browserpass extension.

I just hacked this together this evening. A better alternative may be to ditch the install script and use home.file instead, but this works as well. I would also prefer to build from source.

Copy link
Copy Markdown
Member

@rycee rycee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! I think this could be a very useful module :-)

I agree that it would be much nicer to do this using home.file. Looking at the install.sh file it should be relatively straight forward. The trunk NixOS already has a browserpass module which does something like that.

Comment thread modules/programs/browserpass.nix Outdated
enable = mkEnableOption "the browserpass extension host application";

browsers = mkOption {
type = types.listOf types.str;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be type = types.listOf (types.enum (builtins.attrNames browsers)); to allow the man page to properly show the available options. It also will check the values so the assertion in the config section below is unnecessary.

Comment thread modules/programs/browserpass.nix Outdated
mv * $out/
'';
});
in dagEntryBefore ["writeBoundary"] (builtins.concatStringsSep "" (map (browser: ''
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be dagEntryAfter since the command will write to the home directory.

Comment thread modules/programs/browserpass.nix Outdated
];

home.activation.browserpass = let
browserpass = pkgs.stdenv.mkDerivation (let
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seem to be a browserpass package in Nixpkgs trunk. It might be possible to back-port it to 17.03.

But I guess it cannot be uses as-is because of the permissions issue that you fix below.

Copy link
Copy Markdown
Collaborator Author

@dermetfan dermetfan Jun 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try to update the Nixpkgs equivalent so we can use it with home.file, avoiding the permissions issue.

@dermetfan
Copy link
Copy Markdown
Collaborator Author

dermetfan commented Jun 12, 2017

I already pushed but we should wait for NixOS/nixpkgs#26541 to get merged before squashing.

@rycee
Copy link
Copy Markdown
Member

rycee commented Jun 13, 2017

Great work! This is a big improvement and I'm happy to merge once the Nixpkgs changes are in place.

Are you using unstable Nixpkgs? I'm wondering whether to make a 17.03 branch of home-manager and let the master branch track Nixpkgs master. If so this PR would go into master and not into the 17.03 branch.

@dermetfan
Copy link
Copy Markdown
Collaborator Author

Thanks! 😃 Yes, I use the latest unstable. We should be able to backport to 17.03 though by including copies of the updated packages.

@dermetfan dermetfan merged commit e274fc7 into nix-community:master Jun 30, 2017
@dermetfan dermetfan deleted the browserpass branch June 30, 2017 20:45
pasqui23 pushed a commit to pasqui23/home-manager that referenced this pull request Oct 14, 2017
* browserpass: add module

* apply some review requests

* browserpass: update to 1.0.5

* browserpass: install from Nixpkgs using `home.file`
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