Found a vscode github issue for this: Regression: GDK_SCALE and GDK_DPI_SCALE environment variables are ignored · Issue #242970 · microsoft/vscode · GitHub
This is an issue with Chromium, which means it’s also an issue with electron and vscode. There’s no need to downgrade, it just needs the command line argument --force-device-scale-factor=2
, similar to the fix for Chrome.
I’ve changed my home-manager flake output to something like this:
let
system = "x86_64-linux";
overlays = [
(final: prev: {
vscode = prev.vscode.override {
commandLineArgs = "--force-device-scale-factor=2";
};
})
];
pkgs = import nixpkgs {
inherit overlays;
inherit system;
};
in {
...
};