commit then think
This commit is contained in:
29
modules/nixos/system/virtual/docker.nix
Normal file
29
modules/nixos/system/virtual/docker.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
# pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.virtual.docker;
|
||||
in {
|
||||
options = {
|
||||
virtual.docker.enable =
|
||||
mkEnableOption "enable docker";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
rootless = {
|
||||
enable = true;
|
||||
setSocketVariable = true;
|
||||
};
|
||||
storageDriver = "btrfs";
|
||||
autoPrune.enable = true;
|
||||
#defaultNetwork.settings = {
|
||||
# dns_enabled = true;
|
||||
#};
|
||||
};
|
||||
virtualisation.oci-containers.backend = "docker";
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user