initial commit

This commit is contained in:
2025-05-04 02:47:36 +02:00
commit d5e06f3f49
91 changed files with 9063 additions and 0 deletions

32
modules/dev/docker.nix Normal file
View File

@@ -0,0 +1,32 @@
{
lib,
config,
...
}:
with lib; let
cfg = config.modules.docker;
in {
options.modules.docker = {
enable = mkEnableOption "Enable Docker";
podman.enable = mkEnableOption "Enable Podman rather than Docker";
nvidia.enable = mkEnableOption "Activate Nvidia support";
autoprune.enable = mkEnableOption "Enable autoprune";
};
config = {
virtualisation = {
docker = mkIf (cfg.enable && !cfg.podman.enable) {
enable = true;
enableNvidia = cfg.nvidia.enable;
autoPrune.enable = cfg.autoprune.enable;
};
podman = mkIf cfg.podman.enable {
enable = true;
dockerCompat = cfg.enable;
enableNvidia = cfg.nvidia.enable;
dockerSocket.enable = cfg.enable;
autoPrune.enable = cfg.autoprune.enable;
};
};
};
}