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:
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
home = "/home/emmathorpe";
|
home = "/home/emmathorpe";
|
||||||
description = "Emma Thorpe";
|
description = "Emma Thorpe";
|
||||||
extraGroups = [ "wheel" ];
|
extraGroups = [ "wheel" "docker" ];
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
packages = lib.mkIf (config.features.swayDesktop.enable == true) [
|
packages = lib.mkIf (config.features.swayDesktop.enable == true) [
|
||||||
pkgs.legcord
|
pkgs.legcord
|
||||||
|
|||||||
@@ -13,10 +13,42 @@
|
|||||||
<nixos-wsl/modules>
|
<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" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
features.swayDesktop.enable = false;
|
features.swayDesktop.enable = false;
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
programs.nix-ld.enable = true;
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It's perfectly fine and recommended to leave
|
# on your system were taken. It's perfectly fine and recommended to leave
|
||||||
|
|||||||
Reference in New Issue
Block a user