flocon/modules/docker.nix

21 lines
387 B
Nix
Raw Normal View History

2024-09-24 13:09:36 +00:00
{
config,
lib,
username,
...
2024-09-24 21:47:52 +00:00
}: let
cfg = config.modules.docker;
2024-09-24 21:47:52 +00:00
in {
options.modules.docker.enable = lib.mkEnableOption "docker module";
config = lib.mkIf cfg.enable {
virtualisation.docker = {
enable = true;
rootless = {
enable = true;
setSocketVariable = true;
};
};
2024-09-24 21:47:52 +00:00
users.users.${username}.extraGroups = ["docker"];
};
}