mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
79e66fce1c
Makes codeowners, git history, etc. a bit simpler now that podman has expanded beyond the original single file module and test.
37 lines
757 B
Nix
37 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;
|
|
};
|
|
};
|
|
}
|