nixos/hosts/common/optional/docker/default.nix

30 lines
625 B
Nix
Raw Normal View History

{
pkgs,
inputs,
...
}: {
imports = [inputs.arion.nixosModules.arion];
environment.systemPackages = [
pkgs.arion
pkgs.docker-client
];
2024-07-05 18:58:03 +01:00
virtualisation = {
podman = {
2024-07-06 16:01:17 +01:00
enable = true;
dockerSocket.enable = true;
defaultNetwork.settings.dns_enabled = true;
2024-07-05 18:58:03 +01:00
};
};
2024-11-26 20:03:53 +00:00
# need to open firewall for dns resolving. see https://github.com/NixOS/nixpkgs/issues/226365#issuecomment-1814296639
networking.firewall.interfaces."podman+".allowedUDPPorts = [ 53 ];
environment.persistence."/persist" = {
hideMounts = true;
directories = [
"/var/lib/containers"
];
};
2024-07-05 18:58:03 +01:00
}