cloud/modules/docker/default.nix
2025-04-15 22:31:45 +02:00

24 lines
513 B
Nix

{
pkgs,
lib,
config,
...
}:
{
options.momo-cloud.docker = with lib; {
enable = mkEnableOption "Enable docker daemon with default settings";
};
config = lib.mkIf config.momo-cloud.docker.enable {
virtualisation.docker.enable = true;
networking.firewall.trustedInterfaces = [ "docker0" ];
users.users = (
lib.attrsets.foldlAttrs (
acc: name: value:
acc // { ${name}.extraGroups = [ "wheel" ]; }
) { } config.momo-cloud.authentication.users
);
};
}