mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-25 09:28:27 +02:00
feat(ssh): Using SSH over the HTTPS port for GitHub, refactor ssh config (#187)
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
{
|
||||
{config, ...}: let
|
||||
hostName = "shoukei"; # Define your hostname.
|
||||
in {
|
||||
modules.desktop.hyprland = {
|
||||
nvidia = false;
|
||||
settings = {
|
||||
@@ -11,16 +13,5 @@
|
||||
};
|
||||
};
|
||||
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
Host github.com
|
||||
Hostname github.com
|
||||
# github is controlled by shoukei~
|
||||
IdentityFile ~/.ssh/shoukei
|
||||
# Specifies that ssh should only use the identity file explicitly configured above
|
||||
# required to prevent sending default identity files first.
|
||||
IdentitiesOnly yes
|
||||
'';
|
||||
};
|
||||
programs.ssh.matchBlocks."github.com".identityFile = "${config.home.homeDirectory}/.ssh/${hostName}";
|
||||
}
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
Host github.com
|
||||
Hostname github.com
|
||||
# github is controlled by fern~
|
||||
IdentityFile ~/.ssh/fern
|
||||
# Specifies that ssh should only use the identity file explicitly configured above
|
||||
# required to prevent sending default identity files first.
|
||||
IdentitiesOnly yes
|
||||
'';
|
||||
};
|
||||
{config, ...}: let
|
||||
hostName = "fern";
|
||||
in {
|
||||
programs.ssh.matchBlocks."github.com".identityFile = "${config.home.homeDirectory}/.ssh/${hostName}";
|
||||
}
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
Host github.com
|
||||
Hostname github.com
|
||||
# github is controlled by frieren~
|
||||
IdentityFile ~/.ssh/frieren
|
||||
# Specifies that ssh should only use the identity file explicitly configured above
|
||||
# required to prevent sending default identity files first.
|
||||
IdentitiesOnly yes
|
||||
'';
|
||||
};
|
||||
{config, ...}: let
|
||||
hostName = "frieren";
|
||||
in {
|
||||
programs.ssh.matchBlocks."github.com".identityFile = "${config.home.homeDirectory}/.ssh/${hostName}";
|
||||
}
|
||||
|
||||
@@ -1,14 +1,2 @@
|
||||
_: {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
Host github.com
|
||||
Hostname github.com
|
||||
# github is controlled by harmonica~
|
||||
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
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
{
|
||||
{config, ...}: let
|
||||
hostName = "ai"; # Define your hostname.
|
||||
in {
|
||||
modules.desktop = {
|
||||
hyprland = {
|
||||
nvidia = true;
|
||||
@@ -13,14 +15,5 @@
|
||||
};
|
||||
};
|
||||
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
Host github.com
|
||||
IdentityFile ~/.ssh/idols-ai
|
||||
# Specifies that ssh should only use the identity file explicitly configured above
|
||||
# required to prevent sending default identity files first.
|
||||
IdentitiesOnly yes
|
||||
'';
|
||||
};
|
||||
programs.ssh.matchBlocks."github.com".identityFile = "${config.home.homeDirectory}/.ssh/${hostName}";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user