29
modules/nixos/system/virt/podman.nix
Normal file
29
modules/nixos/system/virt/podman.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.module.virt.podman;
|
||||
in {
|
||||
options = {
|
||||
module.virt.podman.enable =
|
||||
mkEnableOption "enables podman";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
virtualisation = {
|
||||
containers.enable = true;
|
||||
podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
};
|
||||
virtualisation.oci-containers.backend = "podman";
|
||||
environment.systemPackages = with pkgs; [
|
||||
podman-tui
|
||||
podman-compose
|
||||
];
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user