flocon/modules/services/docker.nix

20 lines
387 B
Nix

{
config,
lib,
username,
...
}: let
cfg = config.modules.docker;
in {
options.modules.docker.enable = lib.mkEnableOption "docker module";
config = lib.mkIf cfg.enable {
virtualisation.docker = {
enable = true;
rootless = {
enable = true;
setSocketVariable = true;
};
};
users.users.${username}.extraGroups = ["docker"];
};
}