2024-09-24 13:09:36 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
username,
|
|
|
|
...
|
2024-09-24 21:47:52 +00:00
|
|
|
}: let
|
2024-09-08 13:57:30 +00:00
|
|
|
cfg = config.modules.docker;
|
2024-09-24 21:47:52 +00:00
|
|
|
in {
|
2024-09-08 13:57:30 +00:00
|
|
|
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"];
|
2024-09-08 13:57:30 +00:00
|
|
|
};
|
|
|
|
}
|