2025-06-16 14:44:08 +00:00
|
|
|
# Edit this configuration file to define what should be installed on
|
|
|
|
|
# your system. Help is available in the configuration.nix(5) man page, on
|
|
|
|
|
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
|
|
|
|
|
|
|
|
|
# NixOS-WSL specific options are documented on the NixOS-WSL repository:
|
|
|
|
|
# https://github.com/nix-community/NixOS-WSL
|
|
|
|
|
|
|
|
|
|
{
|
2026-06-02 07:40:25 -07:00
|
|
|
config,
|
|
|
|
|
lib,
|
|
|
|
|
pkgs,
|
|
|
|
|
...
|
|
|
|
|
}:
|
2025-06-16 14:44:08 +00:00
|
|
|
|
2026-06-02 07:40:25 -07:00
|
|
|
{
|
2026-06-02 12:45:40 +00:00
|
|
|
|
|
|
|
|
wsl = {
|
|
|
|
|
enable = true;
|
|
|
|
|
defaultUser = "emmathorpe";
|
|
|
|
|
wslConf.automount.root = "/mnt";
|
|
|
|
|
wslConf.interop.appendWindowsPath = false;
|
|
|
|
|
wslConf.network.generateHosts = false;
|
|
|
|
|
startMenuLaunchers = true;
|
|
|
|
|
docker-desktop.enable = false;
|
2026-06-02 07:40:25 -07:00
|
|
|
extraBin = with pkgs; [
|
2026-06-02 12:45:40 +00:00
|
|
|
# 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"; }
|
|
|
|
|
];
|
|
|
|
|
};
|
2026-06-02 07:40:25 -07:00
|
|
|
|
2026-06-02 12:45:40 +00:00
|
|
|
virtualisation.docker = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enableOnBoot = true;
|
|
|
|
|
autoPrune.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
networking.resolvconf.enable = false;
|
|
|
|
|
|
2026-06-04 12:20:01 +00:00
|
|
|
# Drop the systemd-ssh-proxy Include from the generated /etc/ssh/ssh_config.
|
|
|
|
|
# The NixOS-WSL store is a read-only VHD whose files are owned by nobody
|
|
|
|
|
# (65534), not root. OpenSSH permission-checks Include'd config files and
|
|
|
|
|
# rejects any not owned by root or the caller, so the default include fails
|
|
|
|
|
# with "Bad owner or permissions" and breaks ssh/git for every command. The
|
|
|
|
|
# proxy plugin only matters for `ssh unix/…` / `vsock` to local machined VMs,
|
|
|
|
|
# which WSL does not use.
|
|
|
|
|
programs.ssh.systemd-ssh-proxy.enable = false;
|
|
|
|
|
|
2026-06-02 07:40:25 -07:00
|
|
|
## patch the script
|
2026-06-02 12:45:40 +00:00
|
|
|
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"'';
|
|
|
|
|
|
2025-06-16 14:44:08 +00:00
|
|
|
features.swayDesktop.enable = false;
|
2026-06-02 12:45:40 +00:00
|
|
|
programs.nix-ld.enable = true;
|
2025-06-16 14:44:08 +00:00
|
|
|
# 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
|
|
|
|
|
# this value at the release version of the first install of this system.
|
|
|
|
|
# Before changing this value read the documentation for this option
|
|
|
|
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
|
|
|
system.stateVersion = "24.11"; # Did you read the comment?
|
|
|
|
|
}
|