17 lines
300 B
Nix
17 lines
300 B
Nix
{
|
|
lib,
|
|
config,
|
|
username,
|
|
...
|
|
}: {
|
|
options = {
|
|
docker.enable = lib.mkEnableOption "";
|
|
};
|
|
|
|
config = lib.mkIf config.docker.enable {
|
|
virtualisation.docker.rootless.enable = true;
|
|
virtualisation.docker.enable = true;
|
|
users.users.${username}.extraGroups = ["docker"];
|
|
};
|
|
}
|