File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,16 @@ with builtins; with lib; {
3
3
4
4
options . wsl . docker-native = with types ; {
5
5
enable = mkEnableOption "Native Docker integration in NixOS." ;
6
+
7
+ addToDockerGroup = mkOption {
8
+ type = bool ;
9
+ default = config . security . sudo . wheelNeedsPassword ;
10
+ description = ''
11
+ Wether to add the default user to the docker group.
12
+
13
+ This is not recommend to be enabled because it essentially permits unauthenticated root access.
14
+ '' ;
15
+ } ;
6
16
} ;
7
17
8
18
config =
@@ -23,9 +33,8 @@ with builtins; with lib; {
23
33
24
34
virtualisation . docker . enable = true ;
25
35
26
- users . groups . docker . members = [
36
+ users . groups . docker . members = lib . mkIf cfg . addToDockerGroup [
27
37
config . wsl . defaultUser
28
38
] ;
29
39
} ;
30
-
31
40
}
You can’t perform that action at this time.
0 commit comments