mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-23 17:28:33 +02:00
fix: error in ssh config
This commit is contained in:
@@ -10,13 +10,13 @@
|
|||||||
|
|
||||||
# all my ssh private key are generated by `ssh-keygen -t ed25519 -C "ryan@nickname"`
|
# all my ssh private key are generated by `ssh-keygen -t ed25519 -C "ryan@nickname"`
|
||||||
# the config's format:
|
# the config's format:
|
||||||
# Host — the nickname you’ll use for the host.
|
# Host — given the pattern used to match against the host name given on the command line.
|
||||||
# HostName — the IP address or domain of the remote server.
|
# HostName — specify nickname or abbreviation for host
|
||||||
# User — the username associated with the remote account.
|
|
||||||
# IdentityFile — the location of your SSH key authentication file for the account.
|
# IdentityFile — the location of your SSH key authentication file for the account.
|
||||||
|
# format in details:
|
||||||
|
# https://www.ssh.com/academy/ssh/config
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
Host Homelab
|
Host 192.168.*
|
||||||
Hostname 192.168.*
|
|
||||||
# allow to securely use local SSH agent to authenticate on the remote machine.
|
# 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`
|
# It has the same effect as adding cli option `ssh -A user@host`
|
||||||
ForwardAgent yes
|
ForwardAgent yes
|
||||||
@@ -26,8 +26,7 @@
|
|||||||
# required to prevent sending default identity files first.
|
# required to prevent sending default identity files first.
|
||||||
IdentitiesOnly yes
|
IdentitiesOnly yes
|
||||||
|
|
||||||
Host GitHub
|
Host github.com
|
||||||
Hostname github.com
|
|
||||||
# github is controlled by gluttony~
|
# github is controlled by gluttony~
|
||||||
IdentityFile ~/.ssh/gluttony
|
IdentityFile ~/.ssh/gluttony
|
||||||
# Specifies that ssh should only use the identity file explicitly configured above
|
# Specifies that ssh should only use the identity file explicitly configured above
|
||||||
@@ -38,6 +37,7 @@
|
|||||||
# use ssh-agent so we only need to input passphrase once
|
# use ssh-agent so we only need to input passphrase once
|
||||||
# run `ssh-add /path/to/key` for every identity file
|
# run `ssh-add /path/to/key` for every identity file
|
||||||
# check imported keys by `ssh-add -l`
|
# check imported keys by `ssh-add -l`
|
||||||
|
# TODO `ssh-add` can only add keys temporary, use gnome-keyring to unlock all keys after login.
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
"application/xhtml+xml" = browser;
|
"application/xhtml+xml" = browser;
|
||||||
"text/html" = browser;
|
"text/html" = browser;
|
||||||
"x-scheme-handler/about" = browser;
|
"x-scheme-handler/about" = browser;
|
||||||
# "x-scheme-handler/chrome" = ["chromium-browser.desktop"];
|
|
||||||
"x-scheme-handler/ftp" = browser;
|
"x-scheme-handler/ftp" = browser;
|
||||||
"x-scheme-handler/http" = browser;
|
"x-scheme-handler/http" = browser;
|
||||||
"x-scheme-handler/https" = browser;
|
"x-scheme-handler/https" = browser;
|
||||||
@@ -21,9 +20,8 @@
|
|||||||
"video/*" = ["mpv.dekstop"];
|
"video/*" = ["mpv.dekstop"];
|
||||||
"image/*" = ["imv.desktop"];
|
"image/*" = ["imv.desktop"];
|
||||||
"application/json" = browser;
|
"application/json" = browser;
|
||||||
"application/pdf" = ["org.pwmt.zathura.desktop.desktop"]; # TODO: pdf viewer
|
"application/pdf" = browser; # TODO: pdf viewer
|
||||||
"x-scheme-handler/discord" = ["discord.desktop"];
|
"x-scheme-handler/discord" = ["discord.desktop"];
|
||||||
"x-scheme-handler/spotify" = ["spotify.desktop"];
|
|
||||||
"x-scheme-handler/tg" = ["telegramdesktop.desktop"];
|
"x-scheme-handler/tg" = ["telegramdesktop.desktop"];
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
|||||||
Reference in New Issue
Block a user