Chinmay D. Pai
3ee3a05d61
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>
30 lines
724 B
Nix
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"];
|
|
};
|
|
}
|