fix: configure docker for EDaaS WSL VDI

Enable rootful docker with Docker Desktop proxy patch, add emmathorpe to the docker group, disable resolvconf and enable nix-ld so the WSL distro behaves.
This commit is contained in:
Emma Thorpe
2026-06-02 12:45:40 +00:00
committed by Emma Thorpe
parent 57a5fd3b45
commit ea7503c694
2 changed files with 35 additions and 3 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
isNormalUser = true;
home = "/home/emmathorpe";
description = "Emma Thorpe";
extraGroups = [ "wheel" ];
extraGroups = [ "wheel" "docker" ];
shell = pkgs.zsh;
packages = lib.mkIf (config.features.swayDesktop.enable == true) [
pkgs.legcord
+34 -2
View File
@@ -13,10 +13,42 @@
<nixos-wsl/modules>
];
wsl.enable = true;
wsl.defaultUser = "emmathorpe";
wsl = {
enable = true;
defaultUser = "emmathorpe";
wslConf.automount.root = "/mnt";
wslConf.interop.appendWindowsPath = false;
wslConf.network.generateHosts = false;
startMenuLaunchers = true;
docker-desktop.enable = false;
extraBin = with pkgs; [
# Binaries for Docker Desktop wsl-distro-proxy
{ src = "${coreutils}/bin/mkdir"; }
{ src = "${coreutils}/bin/cat"; }
{ src = "${coreutils}/bin/whoami"; }
{ src = "${coreutils}/bin/ls"; }
{ src = "${busybox}/bin/addgroup"; }
{ src = "${su}/bin/groupadd"; }
{ src = "${su}/bin/usermod"; }
];
};
virtualisation.docker = {
enable = true;
enableOnBoot = true;
autoPrune.enable = true;
};
networking.resolvconf.enable = false;
## patch the script
systemd.services.docker-desktop-proxy.script = lib.mkForce ''${config.wsl.wslConf.automount.root}/wsl/docker-desktop/docker-desktop-user-distro proxy --docker-desktop-root ${config.wsl.wslConf.automount.root}/wsl/docker-desktop "C:\Program Files\Docker\Docker\resources"'';
nix.settings.experimental-features = [ "nix-command" "flakes" ];
features.swayDesktop.enable = false;
nixpkgs.config.allowUnfree = true;
programs.nix-ld.enable = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave