diff --git a/home-modules/dev.nix b/home-modules/dev.nix index 4924d81..4248e29 100644 --- a/home-modules/dev.nix +++ b/home-modules/dev.nix @@ -43,11 +43,27 @@ ]; # SSH config - home.file.sshconfig = { + programs.ssh = { enable = true; - executable = false; - source = ssh/config; - target = ".ssh/config"; + # evaluation warning: user profile: `programs.ssh` default values will be removed in the future. + # Consider setting `programs.ssh.enableDefaultConfig` to false, + # and manually set the default values you want to keep at + # `programs.ssh.matchBlocks."*"`. + enableDefaultConfig = false; + + matchBlocks."*" = { + user = "root"; + controlMaster = "auto"; + controlPersist = "3600"; + controlPath = "/run/user/%i/ssh-socket-%r@%h:%p"; + serverAliveInterval = 20; + }; + + matchBlocks."github.com".user = "git"; + + extraConfig = '' + Include config_local + ''; }; }; } \ No newline at end of file diff --git a/home-modules/ssh/config b/home-modules/ssh/config deleted file mode 100644 index c6ce356..0000000 --- a/home-modules/ssh/config +++ /dev/null @@ -1,8 +0,0 @@ -User root -ServerAliveInterval 20 -ControlMaster auto -ControlPersist 3600 -ControlPath /run/user/%i/ssh-socket-%r@%h:%p - -Host github.com - User git