Skip to content

Commit

Permalink
Using keychain looks fixed the problems, but makes 2x slower shell ex…
Browse files Browse the repository at this point in the history
…ecutions
  • Loading branch information
kachick committed Aug 10, 2023
1 parent b1f640b commit e966da7
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions home-manager/bash.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
programs.zoxide.enableBashIntegration = true;
programs.fzf.enableBashIntegration = true;
programs.rtx.enableBashIntegration = true;
programs.keychain.enableBashIntegration = true;

# Used only in bash - https://unix.stackexchange.com/a/689403
# https://github.com/nix-community/home-manager/blob/master/modules/programs/readline.nix
Expand Down
1 change: 1 addition & 0 deletions home-manager/fish.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
programs.zoxide.enableFishIntegration = true;
programs.fzf.enableFishIntegration = true;
programs.rtx.enableFishIntegration = true;
programs.keychain.enableFishIntegration = true;

xdg.configFile."fish/fish_variables".source = ../home/.config/fish/fish_variables;
xdg.configFile."fish/functions/fish_prompt.fish".source = ../home/.config/fish/functions/fish_prompt.fish;
Expand Down
4 changes: 3 additions & 1 deletion home-manager/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@
# https://github.com/nix-community/home-manager/blob/a8f8f48320c64bd4e3a266a850bbfde2c6fe3a04/modules/services/ssh-agent.nix#L37
openssh

gnome3.gnome-keyring
# gnome3.gnome-keyring

keychain
]
) ++ (lib.optionals stdenv.isDarwin
[
Expand Down
15 changes: 11 additions & 4 deletions home-manager/ssh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,18 @@ in
# https://github.com/nix-community/home-manager/blob/master/modules/services/ssh-agent.nix
services.ssh-agent.enable = if pkgs.stdenv.isLinux then true else false;

# https://github.com/nix-community/home-manager/blob/master/modules/services/gnome-keyring.nix
services.gnome-keyring = {
enable = if pkgs.stdenv.isLinux then true else false;
# # https://github.com/nix-community/home-manager/blob/master/modules/services/gnome-keyring.nix
# services.gnome-keyring = {
# enable = if pkgs.stdenv.isLinux then true else false;

components = [ "ssh" "secrets" "pkcs11" ];
# components = [ "ssh" "secrets" "pkcs11" ];
# };

# https://github.com/nix-community/home-manager/blob/master/modules/programs/keychain.nix
programs.keychain = {
enable = true;
# https://github.com/nix-community/home-manager/blob/a8f8f48320c64bd4e3a266a850bbfde2c6fe3a04/modules/programs/keychain.nix#L35
keys = [ "id_ed25519" ];
};

# These hosts are taken from the public resources of each provider.
Expand Down
1 change: 1 addition & 0 deletions home-manager/zsh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
programs.zoxide.enableZshIntegration = true;
programs.fzf.enableZshIntegration = true;
programs.rtx.enableZshIntegration = true;
programs.keychain.enableZshIntegration = true;

# https://nixos.wiki/wiki/Zsh
# https://github.com/nix-community/home-manager/blob/master/modules/programs/zsh.nix
Expand Down

0 comments on commit e966da7

Please sign in to comment.