mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-11 03:36:52 +02:00
54 lines
1.9 KiB
Nix
54 lines
1.9 KiB
Nix
{
|
|
# Homebrew's default install location:
|
|
# /opt/homebrew for Apple Silicon
|
|
# /usr/local for macOS Intel
|
|
# The prefix /opt/homebrew was chosen to allow installations
|
|
# in /opt/homebrew for Apple Silicon and /usr/local for Rosetta 2 to coexist and use bottles.
|
|
programs.bash = {
|
|
enable = true;
|
|
bashrcExtra = ''
|
|
export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
|
|
'';
|
|
};
|
|
programs.zsh = {
|
|
enable = true;
|
|
envExtra = ''
|
|
export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
|
|
'';
|
|
};
|
|
|
|
programs.ssh = {
|
|
enable = true;
|
|
|
|
# all my ssh private key are generated by `ssh-keygen -t ed25519 -C "ryan@nickname"`
|
|
# the config's format:
|
|
# Host — given the pattern used to match against the host name given on the command line.
|
|
# HostName — specify nickname or abbreviation for host
|
|
# IdentityFile — the location of your SSH key authentication file for the account.
|
|
# format in details:
|
|
# https://www.ssh.com/academy/ssh/config
|
|
extraConfig = ''
|
|
# a private key that is used during authentication will be added to ssh-agent if it is running
|
|
AddKeysToAgent yes
|
|
|
|
Host 192.168.*
|
|
# allow to securely use local SSH agent to authenticate on the remote machine.
|
|
# It has the same effect as adding cli option `ssh -A user@host`
|
|
ForwardAgent yes
|
|
# romantic holds my homelab~
|
|
IdentityFile ~/.ssh/romantic
|
|
# Specifies that ssh should only use the identity file explicitly configured above
|
|
# required to prevent sending default identity files first.
|
|
IdentitiesOnly yes
|
|
|
|
Host github.com
|
|
Hostname github.com
|
|
# github is controlled by gluttony~
|
|
IdentityFile ~/.ssh/harmonica
|
|
# Specifies that ssh should only use the identity file explicitly configured above
|
|
# required to prevent sending default identity files first.
|
|
IdentitiesOnly yes
|
|
'';
|
|
};
|
|
}
|