mirror of
https://github.com/srid/nixos-config.git
synced 2026-05-11 17:36:07 +08:00
decouple 1Password
This commit is contained in:
parent
ada0cc1e7c
commit
414ad642b2
5 changed files with 26 additions and 14 deletions
23
home/_1password.nix
Normal file
23
home/_1password.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
_1password
|
||||
gh
|
||||
];
|
||||
|
||||
programs.zsh.envExtra = ''
|
||||
# For 1Password CLI. This requires `pkgs.gh` to be installed.
|
||||
source $HOME/.config/op/plugins.sh
|
||||
'';
|
||||
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
# Configure 1Password agent only on macOS; whilst using agent forwarding
|
||||
# to make it available to Linux machines.
|
||||
"*".extraOptions = lib.mkIf pkgs.stdenv.isDarwin {
|
||||
identityAgent = ''"~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
imports = [
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
inputs.nix-index-database.hmModules.nix-index
|
||||
./_1password.nix
|
||||
./tmux.nix
|
||||
./neovim.nix
|
||||
# ./helix.nix
|
||||
|
|
|
|||
10
home/ssh.nix
10
home/ssh.nix
|
|
@ -1,18 +1,10 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
inherit (pkgs) stdenv;
|
||||
in
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
# Configure 1Password agent only on macOS; whilst using agent forwarding
|
||||
# to make it available to Linux machines.
|
||||
"*".extraOptions = lib.mkIf stdenv.isDarwin {
|
||||
identityAgent = ''"~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"'';
|
||||
};
|
||||
vanjaram = {
|
||||
hostname = "100.94.107.36";
|
||||
hostname = "100.83.79.127";
|
||||
user = "srid";
|
||||
forwardAgent = true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -19,8 +19,7 @@
|
|||
# But also see: 'doom env', which is what works.
|
||||
envExtra = ''
|
||||
export PATH=/etc/profiles/per-user/$USER/bin:/run/current-system/sw/bin/:/usr/local/bin:$PATH
|
||||
# For 1Password CLI. This requires `pkgs.gh` to be installed.
|
||||
source $HOME/.config/op/plugins.sh
|
||||
|
||||
# Because, adding it in .ssh/config is not enough.
|
||||
# cf. https://developer.1password.com/docs/ssh/get-started#step-4-configure-your-ssh-or-git-client
|
||||
export SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock
|
||||
|
|
|
|||
|
|
@ -10,9 +10,6 @@
|
|||
# onlyoffice-bin
|
||||
obsidian
|
||||
|
||||
_1password
|
||||
_1password-gui
|
||||
|
||||
simplescreenrecorder
|
||||
obs-studio
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue