-
Notifications
You must be signed in to change notification settings - Fork 2
/
wsl.nix
39 lines (36 loc) · 1.24 KB
/
wsl.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
# FIXME: uncomment the next line if you want to reference your GitHub/GitLab access tokens and other secrets
# secrets,
username,
pkgs,
...
}: {
environment.systemPackages = [
(import ./win32yank.nix {inherit pkgs;})
];
wsl = {
enable = true;
wslConf.automount.root = "/mnt";
wslConf.interop.appendWindowsPath = false;
wslConf.network.generateHosts = false;
defaultUser = username;
startMenuLaunchers = true;
# Enable integration with Docker Desktop (needs to be installed)
docker-desktop.enable = false;
};
# FIXME: uncomment the next block to make vscode running in Windows "just work" with NixOS on WSL
# solution adapted from: https://github.com/K900/vscode-remote-workaround
# more information: https://github.com/nix-community/NixOS-WSL/issues/238 and https://github.com/nix-community/NixOS-WSL/issues/294
# systemd.user = {
# paths.vscode-remote-workaround = {
# wantedBy = ["default.target"];
# pathConfig.PathChanged = "%h/.vscode-server/bin";
# };
# services.vscode-remote-workaround.script = ''
# for i in ~/.vscode-server/bin/*; do
# echo "Fixing vscode-server in $i..."
# ln -sf ${pkgs.nodejs_18}/bin/node $i/node
# done
# '';
# };
}