diff options
| author | Fuwn <[email protected]> | 2024-09-23 01:14:56 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-09-23 01:14:56 -0700 |
| commit | c0110b440d96cf6fcf7ecf0bdf337ffe7d032f81 (patch) | |
| tree | 6e79d7ddfa1d427f36b21f4551e2f9c321c924bf /modules/server/virtualisation/default.nix | |
| parent | server: remove beszel (diff) | |
| download | nixos-config-c0110b440d96cf6fcf7ecf0bdf337ffe7d032f81.tar.xz nixos-config-c0110b440d96cf6fcf7ecf0bdf337ffe7d032f81.zip | |
refactor(server): move containers to module
Diffstat (limited to 'modules/server/virtualisation/default.nix')
| -rw-r--r-- | modules/server/virtualisation/default.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/modules/server/virtualisation/default.nix b/modules/server/virtualisation/default.nix new file mode 100644 index 0000000..918ecfe --- /dev/null +++ b/modules/server/virtualisation/default.nix @@ -0,0 +1,26 @@ +{ config, ... }: +let + inherit (config.modules.server) containerEngine; +in +{ + imports = [ ./containers ]; + + virtualisation = { + containers.enable = true; + oci-containers.backend = containerEngine; + + docker = { + enable = containerEngine == "docker"; + + daemon.settings = { + iptables = false; + }; + }; + + podman = { + enable = containerEngine == "podman"; + dockerCompat = true; + defaultNetwork.settings.dns_enabled = true; + }; + }; +} |