3cbfd2b52c
GitOrigin-RevId: 395879c28386e1abf20c7ecacd45880759548391
36 lines
757 B
Nix
36 lines
757 B
Nix
{ config, lib, pkgs, ... }:
|
|
let
|
|
inherit (lib)
|
|
mkOption
|
|
mkIf
|
|
types
|
|
;
|
|
|
|
cfg = config.virtualisation.podman;
|
|
|
|
in
|
|
{
|
|
options = {
|
|
virtualisation.podman = {
|
|
|
|
defaultNetwork.dnsname.enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = ''
|
|
Enable DNS resolution in the default podman network.
|
|
'';
|
|
};
|
|
|
|
};
|
|
};
|
|
|
|
config = {
|
|
virtualisation.containers.containersConf.cniPlugins = mkIf cfg.defaultNetwork.dnsname.enable [ pkgs.dnsname-cni ];
|
|
virtualisation.podman.defaultNetwork.extraPlugins =
|
|
lib.optional cfg.defaultNetwork.dnsname.enable {
|
|
type = "dnsname";
|
|
domainName = "dns.podman";
|
|
capabilities.aliases = true;
|
|
};
|
|
};
|
|
}
|