1Password: Difference between revisions
m →Unlocking with System Authentication: don't link to old wiki |
m auto detect onePassPath for darwin / linux, and add SSH_AUTH_SOCK method |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 11: | Line 11: | ||
# Enable the unfree 1Password packages | # Enable the unfree 1Password packages | ||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ | nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ | ||
"1password-cli" | |||
"1password-gui" | "1password-gui" | ||
"1password" | "1password" | ||
| Line 63: | Line 64: | ||
== Home Manager == | == Home Manager == | ||
{{warning|1=Non-[[NixOS]] installs [https://1password.community/ | {{warning|1=Non-[[NixOS]] installs [https://www.1password.community/discussions/1password/sandboxed-application-cant-communicate-with-browser-extension/91984/replies/92015 will not link with browser extensions or system authentication] }} | ||
=== Installation === | === Installation === | ||
| Line 87: | Line 88: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
let | |||
onePassPath = if pkgs.stdenv.isDarwin | |||
then "${config.home.homeDirectory}/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock" | |||
else "${config.home.homeDirectory}/.1password/agent.sock"; | |||
in { | in { | ||
home.sessionVariables.SSH_AUTH_SOCK = onePassPath; | |||
# or, alternatively, set it in `.ssh/config` which has higher precedence: | |||
programs.ssh = { | programs.ssh = { | ||
enable = true; | enable = true; | ||