Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions home/base/core/editors/neovim/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
config,
nixpkgs,
nixvim,
pkgs,
...
}:
{

imports = [ nixvim.homeModules.nixvim ];

programs.nixvim.nixpkgs.source = nixpkgs;
home.shellAliases = {

vi = "nvim";
Expand Down
48 changes: 19 additions & 29 deletions home/base/tui/ssh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,32 @@
programs.ssh = {
enable = true;

# default config
enableDefaultConfig = false;
matchBlocks."*" = {
forwardAgent = false;
# "a private key that is used during authentication will be added to ssh-agent if it is running"
addKeysToAgent = "yes";
compression = true;
serverAliveInterval = 0;
serverAliveCountMax = 3;
hashKnownHosts = false;
userKnownHostsFile = "~/.ssh/known_hosts";
controlMaster = "no";
controlPath = "~/.ssh/master-%r@%n:%p";
controlPersist = "no";
settings."*" = {
ForwardAgent = false;
AddKeysToAgent = "yes";
Compression = true;
ServerAliveInterval = 0;
ServerAliveCountMax = 3;
HashKnownHosts = false;
UserKnownHostsFile = "~/.ssh/known_hosts";
ControlMaster = "no";
ControlPath = "~/.ssh/master-%r@%n:%p";
ControlPersist = "no";
};

matchBlocks = {
settings = {
"github.com" = {
# "Using SSH over the HTTPS port for GitHub"
# "(port 22 is banned by some proxies / firewalls)"
hostname = "ssh.github.com";
port = 443;
user = "git";

# Specifies that ssh should only use the identity file explicitly configured above
# required to prevent sending default identity files first.
identitiesOnly = true;
HostName = "ssh.github.com";
Port = 443;
User = "git";
IdentitiesOnly = true;
};

"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 = true;
# "romantic holds my homelab~"
identityFile = "/etc/agenix/ssh-key-romantic";
identitiesOnly = true;
ForwardAgent = true;
IdentityFile = "/etc/agenix/ssh-key-romantic";
IdentitiesOnly = true;
};
};
};
Expand Down
3 changes: 1 addition & 2 deletions home/hosts/darwin/darwin-fern.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ in
{
imports = [ ../../darwin ];

programs.ssh.matchBlocks."github.com".identityFile =
"${config.home.homeDirectory}/.ssh/${hostName}";
programs.ssh.settings."github.com".IdentityFile = "${config.home.homeDirectory}/.ssh/${hostName}";
}
3 changes: 1 addition & 2 deletions home/hosts/darwin/darwin-frieren.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ in
{
imports = [ ../../darwin ];

programs.ssh.matchBlocks."github.com".identityFile =
"${config.home.homeDirectory}/.ssh/${hostName}";
programs.ssh.settings."github.com".IdentityFile = "${config.home.homeDirectory}/.ssh/${hostName}";
}
3 changes: 1 addition & 2 deletions home/hosts/linux/12kingdoms-shoukei.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ in
{
imports = [ ../../linux/gui.nix ];

programs.ssh.matchBlocks."github.com".identityFile =
"${config.home.homeDirectory}/.ssh/${hostName}";
programs.ssh.settings."github.com".IdentityFile = "${config.home.homeDirectory}/.ssh/${hostName}";

modules.desktop.gaming.enable = false;
modules.desktop.niri.enable = true;
Expand Down
2 changes: 1 addition & 1 deletion home/hosts/linux/idols-ai.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ in
{
imports = [ ../../linux/gui.nix ];

programs.ssh.matchBlocks."github.com".identityFile = "${config.home.homeDirectory}/.ssh/idols-ai";
programs.ssh.settings."github.com".IdentityFile = "${config.home.homeDirectory}/.ssh/idols-ai";

modules.desktop.gaming.enable = true;
modules.desktop.niri.enable = true;
Expand Down