nix/modules/services/docker/default.nix
2024-11-24 20:15:38 +01:00

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"];
};
}