flakes/modules/nixos/core/docker/default.nix
Chinmay D. Pai 3ee3a05d61
chore: allow docker to use iptables
Had been removed to debug issues with netbird connectivity after suspend.
Can be added back since the issue is unrelated.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-02 19:05:15 +05:30

30 lines
724 B
Nix

{
config,
lib,
...
}: {
options.snowflake.core.docker = {
enable = lib.mkEnableOption "Enable core docker configuration";
storageDriver = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = "Storage driver backend to use for docker";
};
};
config = lib.mkIf config.snowflake.core.docker.enable {
virtualisation.docker = {
enable = true;
# Required for containers with `--restart=always`.
enableOnBoot = true;
autoPrune = {
enable = true;
};
inherit (config.snowflake.core.docker) storageDriver;
};
# Add the system user to the docker group
snowflake.user.extraGroups = ["docker"];
};
}