diff --git a/emmathorpe/user.nix b/emmathorpe/user.nix index 42e5db4..3776b37 100644 --- a/emmathorpe/user.nix +++ b/emmathorpe/user.nix @@ -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 diff --git a/system/machine/EDaaS/configuration.nix b/system/machine/EDaaS/configuration.nix index 994b2fd..089de17 100644 --- a/system/machine/EDaaS/configuration.nix +++ b/system/machine/EDaaS/configuration.nix @@ -13,10 +13,42 @@ ]; - 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