Fixes for vscode-fhs issues with ssh
This commit is contained in:
parent
2d703a0498
commit
24c79f50d3
8 changed files with 76 additions and 66 deletions
|
@ -22,7 +22,7 @@
|
|||
./git.nix
|
||||
./ranger.nix
|
||||
./screen.nix
|
||||
./ssh.nix
|
||||
./ssh
|
||||
./zoxide.nix
|
||||
];
|
||||
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
# Avoids infinite hang if control socket connection interrupted. ex: vpn goes down/up
|
||||
serverAliveCountMax = 3;
|
||||
serverAliveInterval = 5;
|
||||
addKeysToAgent = "yes";
|
||||
|
||||
extraConfig = ''
|
||||
IdentityFile ~/.ssh/pve
|
||||
UpdateHostKeys ask
|
||||
'';
|
||||
|
||||
matchBlocks = {
|
||||
"git.ryot.foo" = {
|
||||
identityFile = "~/git/.ssh/git";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
17
home/toph/common/core/ssh/config
Normal file
17
home/toph/common/core/ssh/config
Normal file
|
@ -0,0 +1,17 @@
|
|||
Host git.ryot.foo
|
||||
IdentityFile ~/git/.ssh/git
|
||||
|
||||
Host *
|
||||
ForwardAgent no
|
||||
AddKeysToAgent yes
|
||||
Compression no
|
||||
ServerAliveInterval 5
|
||||
ServerAliveCountMax 3
|
||||
HashKnownHosts no
|
||||
UserKnownHostsFile ~/.ssh/known_hosts
|
||||
ControlMaster no
|
||||
ControlPath ~/.ssh/master-%r@%n:%p
|
||||
ControlPersist no
|
||||
|
||||
IdentityFile ~/.ssh/pve
|
||||
UpdateHostKeys ask
|
32
home/toph/common/core/ssh/default.nix
Normal file
32
home/toph/common/core/ssh/default.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# programs.ssh = {
|
||||
# enable = true;
|
||||
# # Avoids infinite hang if control socket connection interrupted. ex: vpn goes down/up
|
||||
# serverAliveCountMax = 3;
|
||||
# serverAliveInterval = 5;
|
||||
# addKeysToAgent = "yes";
|
||||
|
||||
# extraConfig = ''
|
||||
# IdentityFile ~/.ssh/pve
|
||||
# UpdateHostKeys ask
|
||||
# '';
|
||||
|
||||
# matchBlocks = {
|
||||
# "git.ryot.foo" = {
|
||||
# identityFile = "~/git/.ssh/git";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
|
||||
home.file.".ssh/config" = {
|
||||
source = ./config;
|
||||
target = ".ssh/config_source";
|
||||
onChange = ''cat .ssh/config_source > .ssh/config && chmod 400 .ssh/config'';
|
||||
};
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
# imports = lib.custom.scanPaths ./.;
|
||||
imports = lib.custom.scanPaths ./.;
|
||||
|
||||
home.packages = lib.flatten [
|
||||
(builtins.attrValues {
|
||||
|
@ -18,7 +18,6 @@
|
|||
logisim-evolution
|
||||
mcaselector
|
||||
prettierd
|
||||
vscode-fhs
|
||||
|
||||
# nix
|
||||
nixpkgs-review
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
# Same idea as package itself, not working might remove
|
||||
|
||||
let
|
||||
fleet = pkgs.callPackage ../../../../../pkgs/common/fleet/package.nix { };
|
||||
in
|
||||
{
|
||||
home.packages = [
|
||||
fleet
|
||||
];
|
||||
|
||||
xdg.desktopEntries = {
|
||||
fleet = {
|
||||
name = "Fleet";
|
||||
comment = "Jetbrains Fleet";
|
||||
exec = "fleet %u";
|
||||
icon = "${config.home.homeDirectory}/.local/share/JetBrains/Toolbox/apps/fleet/lib/Fleet.png";
|
||||
type = "Application";
|
||||
terminal = false;
|
||||
mimeType = [
|
||||
"text/plain"
|
||||
"inode/directory"
|
||||
"x-scheme-handler/fleet"
|
||||
];
|
||||
categories = [
|
||||
"Development"
|
||||
"IDE"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
13
home/toph/common/optional/development/openssh.patch
Normal file
13
home/toph/common/optional/development/openssh.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/readconf.h b/readconf.h
|
||||
index ded13c9..94f489e 100644
|
||||
--- a/readconf.h
|
||||
+++ b/readconf.h
|
||||
@@ -203,7 +203,7 @@ typedef struct {
|
||||
#define SESSION_TYPE_SUBSYSTEM 1
|
||||
#define SESSION_TYPE_DEFAULT 2
|
||||
|
||||
-#define SSHCONF_CHECKPERM 1 /* check permissions on config file */
|
||||
+#define SSHCONF_CHECKPERM 0 /* check permissions on config file */
|
||||
#define SSHCONF_USERCONF 2 /* user provided config file not system */
|
||||
#define SSHCONF_FINAL 4 /* Final pass over config, after canon. */
|
||||
#define SSHCONF_NEVERMATCH 8 /* Match/Host never matches; internal only */
|
12
home/toph/common/optional/development/vscode.nix
Normal file
12
home/toph/common/optional/development/vscode.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
patched-openssh = pkgs.openssh.overrideAttrs (prev: {
|
||||
patches = (prev.patches or [ ]) ++ [ ./openssh.patch ];
|
||||
});
|
||||
in
|
||||
{
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscode.fhsWithPackages (_: [ patched-openssh ]);
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue