feat: enable remote dev on vscode
This commit is contained in:
parent
b72c2a344d
commit
270fc68ccc
2 changed files with 39 additions and 27 deletions
|
@ -4,17 +4,34 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.programs.vscode.enable {
|
||||
programs.vscode = {
|
||||
package = pkgs.vscodium;
|
||||
enableUpdateCheck = false;
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
rust-lang.rust-analyzer
|
||||
];
|
||||
userSettings = {
|
||||
"editor.formatOnSave" = true;
|
||||
"update.mode" = "none";
|
||||
"idf.espIdfPath" = "/home/ny/esp/v5.2.2/esp-idf";
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.programs.vscode;
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
programs.vscode = {
|
||||
package = pkgs.vscode;
|
||||
enableUpdateCheck = false;
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
rust-lang.rust-analyzer
|
||||
ms-vscode-remote.remote-ssh
|
||||
ms-vscode-remote.remote-ssh-edit
|
||||
ms-vscode.remote-explorer
|
||||
tamasfe.even-better-toml
|
||||
];
|
||||
userSettings = {
|
||||
editor.formatOnSave = true;
|
||||
terminal.integrated.inheritEnv = false;
|
||||
git.autofetch = true;
|
||||
remote.SSH = {
|
||||
connectTimeout = 60;
|
||||
useLocalServer = true;
|
||||
remotePlatform = {
|
||||
"192.168.122.152" = "linux";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
in
|
||||
|
@ -11,21 +16,11 @@ mkIf config.programs.ssh.enable {
|
|||
user = "deck";
|
||||
port = 22;
|
||||
};
|
||||
# dockervm = {
|
||||
#hostname = "192.168.178.22";
|
||||
#user = "nydragon";
|
||||
#port = 22;
|
||||
#};
|
||||
# raptus = {
|
||||
#hostname = "vps.ccnlc.eu";
|
||||
#user = "ny";
|
||||
#port = 56528;
|
||||
#};
|
||||
#shan = {
|
||||
#hostname = "192.168.178.27";
|
||||
#user = "root";
|
||||
#port = 22;
|
||||
#};
|
||||
vm = mkIf (osConfig.networking.hostName == "marr") {
|
||||
hostname = "192.168.122.152";
|
||||
user = "ny";
|
||||
port = 22;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue