2024-09-24 13:09:36 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
username,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
2024-09-08 13:57:30 +00:00
|
|
|
cfg = config.modules.docker;
|
|
|
|
in
|
2024-09-24 13:09:36 +00:00
|
|
|
{
|
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-08 14:00:25 +00:00
|
|
|
users.users.${username}.extraGroups = [ "docker" ];
|
2024-09-08 13:57:30 +00:00
|
|
|
};
|
|
|
|
}
|