Skip to content

Commit

Permalink
change "docker-native" option to "docker", revise language, and forma…
Browse files Browse the repository at this point in the history
…t code
  • Loading branch information
ajaxbits committed Apr 21, 2022
1 parent 2a9ce11 commit 68bfec5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ in
defaultUser = "nixos";
startMenuLaunchers = true;

# Enable native Docker support
# docker.enable = true;

# Enable integration with Docker Desktop (needs to be installed)
# docker-desktop.enable = true;

# Enable native Docker support within NixOS
# docker-native.enable = true;
};

# Enable nix flakes
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
imports = [
./modules/build-tarball.nix
./modules/wsl-distro.nix
./modules/docker.nix
./modules/docker-desktop.nix
./modules/installer.nix
./modules/docker-native.nix
];
};

Expand Down
6 changes: 3 additions & 3 deletions modules/docker-native.nix → modules/docker.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{ config, lib, pkgs, ... }:
with builtins; with lib; {

options.wsl.docker-native = with types; {
enable = mkEnableOption "Native Docker integration in NixOS.";
options.wsl.docker = with types; {
enable = mkEnableOption "Enable native Docker support in NixOS.";
};

config =
let
cfg = config.wsl.docker-native;
cfg = config.wsl.docker;
in
mkIf (config.wsl.enable && cfg.enable) {
nixpkgs.overlays = [
Expand Down

0 comments on commit 68bfec5

Please sign in to comment.