Skip to content

Instantly share code, notes, and snippets.

@swdunlop
swdunlop / README.md
Last active May 7, 2021 18:50
A script to fix Visual Code Remoting via SSH to NixOS after the April 2021 update

NixOS does not normally install libraries in a FHS layout, which means that binaries compiled for other Linux platforms typically will not work. Visual Studio Code's Remote SSH extension transfers a NodeJS binary and a binary library built by Microsoft that must be patched to be used on NixOS.

Prior to April 2021, this could simply be done by replacing .vscode-server/bin/*/node with nodejs-12_x; after April 2021, there is also a library module that is not compatible with nodejs-12_x. Therefore, it is necessary to patch these two ELF files.

What happens if you just replace nodejs (the pre-April solution from nixos.wiki)

@swdunlop
swdunlop / Dockerfile
Created September 28, 2021 19:22
Rootless Nix Dev Container for Visual Code hackers
# See here for base image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.194.0/containers/alpine/.devcontainer/base.Dockerfile
ARG ALPINE_VERSION="3.14"
FROM mcr.microsoft.com/vscode/devcontainers/base:0-alpine-${ALPINE_VERSION}
USER root
# https://nvd.nist.gov/vuln/detail/CVE-2019-5021
RUN sed -i -e 's/^root::/root:!:/' /etc/shadow
@swdunlop
swdunlop / mustang.toml
Created March 17, 2022 00:05
Port of Mustang theme to the Helix text editor
# Author: Scott W. Dunlop <[email protected]>
# Derived from RayGervais <[email protected]>
# Original Mustang color theme: https://www.deviantart.com/hcalves/art/Mustang-Vim-Colorscheme-98974484
"ui.background" = { bg = "base00" }
"ui.menu" = "base01"
"ui.menu.selected" = { fg = "base01", bg = "base04" }
"ui.linenr" = { fg = "base03", bg = "base01" }
"ui.popup" = { bg = "base01" }
"ui.window" = { bg = "base01" }