fix vscode

This commit is contained in:
Osman Faruk Bayram 2025-10-21 15:29:38 +03:00
parent d98a5734fc
commit 5101d47e2d

View file

@ -1,53 +1,56 @@
{ {
config, config,
pkgs, pkgs,
lib,
... ...
}: }:
{ {
services.code-server = { config = (lib.mkIf config.osbmModules.services.vscode-server.enable {
# only true if the machine is not pochita services.code-server = {
enable = config.networking.hostName != "pochita"; # only true if the machine is not pochita
port = 4444; enable = config.networking.hostName != "pochita";
disableTelemetry = true; port = 4444;
disableUpdateCheck = true; disableTelemetry = true;
user = "osbm"; disableUpdateCheck = true;
group = "users"; user = "osbm";
# auth = "none"; group = "users";
host = "${config.networking.hostName}.curl-boga.ts.net"; # auth = "none";
hashedPassword = "$argon2i$v=19$m=4096,t=3,p=1$dGc0TStGMDNzSS9JRkJYUFp3d091Q2p0bXlzPQ$zvdE9BkclkJmyFaenzPy2E99SEqsyDMt4IQNZfcfFFQ"; host = "${config.networking.hostName}.curl-boga.ts.net";
package = pkgs.vscode-with-extensions.override { hashedPassword = "$argon2i$v=19$m=4096,t=3,p=1$dGc0TStGMDNzSS9JRkJYUFp3d091Q2p0bXlzPQ$zvdE9BkclkJmyFaenzPy2E99SEqsyDMt4IQNZfcfFFQ";
vscode = pkgs.code-server; package = pkgs.vscode-with-extensions.override {
vscodeExtensions = vscode = pkgs.code-server;
with pkgs.vscode-extensions; vscodeExtensions =
[ with pkgs.vscode-extensions;
bbenoist.nix [
catppuccin.catppuccin-vsc bbenoist.nix
catppuccin.catppuccin-vsc-icons catppuccin.catppuccin-vsc
charliermarsh.ruff catppuccin.catppuccin-vsc-icons
davidanson.vscode-markdownlint charliermarsh.ruff
esbenp.prettier-vscode davidanson.vscode-markdownlint
foxundermoon.shell-format esbenp.prettier-vscode
github.copilot foxundermoon.shell-format
github.vscode-github-actions github.copilot
github.vscode-pull-request-github github.vscode-github-actions
jnoortheen.nix-ide github.vscode-pull-request-github
kamadorueda.alejandra jnoortheen.nix-ide
ms-azuretools.vscode-docker kamadorueda.alejandra
ms-python.python ms-azuretools.vscode-docker
# ms-vscode-remote.remote-ssh ms-python.python
timonwong.shellcheck # ms-vscode-remote.remote-ssh
tyriar.sort-lines timonwong.shellcheck
] tyriar.sort-lines
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [ ]
{ ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
# Available in nixpkgs, but outdated (0.4.0) at the time of adding {
name = "vscode-tailscale"; # Available in nixpkgs, but outdated (0.4.0) at the time of adding
publisher = "tailscale"; name = "vscode-tailscale";
sha256 = "sha256-MKiCZ4Vu+0HS2Kl5+60cWnOtb3udyEriwc+qb/7qgUg="; publisher = "tailscale";
version = "1.0.0"; sha256 = "sha256-MKiCZ4Vu+0HS2Kl5+60cWnOtb3udyEriwc+qb/7qgUg=";
} version = "1.0.0";
]; }
];
};
}; };
}; networking.firewall.allowedTCPPorts = [ config.services.code-server.port ];
networking.firewall.allowedTCPPorts = [ config.services.code-server.port ]; });
} }