feat: enable remote dev on vscode

This commit is contained in:
Nydragon 2025-01-04 19:35:54 +01:00
parent b72c2a344d
commit 270fc68ccc
Signed by: nydragon
SSH key fingerprint: SHA256:WcjW5NJPQ8Dx4uQDmoIlVPLWE27Od3fxoe0IUvuoPHE
2 changed files with 39 additions and 27 deletions

View file

@ -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";
};
};
};
};
};
}

View file

@ -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;
};
};
};
}