nix/lib/modules/nixos/podman.nix
Daniel Flanagan f637419595
Some checks failed
/ build-host (map[host:beefcake]) (push) Failing after 49s
/ build-host (map[host:dragon]) (push) Failing after 47s
/ build-host (map[host:flipflop]) (push) Failing after 51s
/ build-host (map[host:foxtrot]) (push) Failing after 51s
/ build-host (map[host:router]) (push) Failing after 40s
/ build-devshell (push) Failing after 51s
/ flake-check (push) Failing after 42s
fix: resolve conflicts and set version for CI workflow
2025-03-19 16:48:53 -05:00

42 lines
787 B
Nix

{
pkgs,
config,
lib,
...
}:
{
options = {
podman.enable = lib.mkEnableOption "Enable podman and associated general NixOS defaults";
};
config = lib.mkIf config.podman.enable {
environment = {
systemPackages = with pkgs; [
podman-tui
podman-compose
];
};
virtualisation = {
podman = {
enable = true;
dockerCompat = true;
dockerSocket.enable = true;
defaultNetwork.settings.dns_enabled = true;
};
oci-containers = {
backend = "podman";
};
};
networking = {
extraHosts = ''
127.0.0.1 host.docker.internal
::1 host.docker.internal
127.0.0.1 host.containers.internal
::1 host.containers.internal
'';
};
};
}