24 lines
513 B
Nix
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
|
|
);
|
|
};
|
|
}
|