diff options
author | zowoq <59103226+zowoq@users.noreply.github.com> | 2021-12-09 12:10:44 +1000 |
---|---|---|
committer | zowoq <59103226+zowoq@users.noreply.github.com> | 2021-12-09 13:03:16 +1000 |
commit | 79e66fce1c2b5a7de3e9a0e75b591ca9552a62ef (patch) | |
tree | ce67a92c6dee4e6a303db425d9eefccba438cbd9 /nixos/modules/virtualisation/podman/dnsname.nix | |
parent | ce82da442b5f66c26f71443e7567e1765953ea9d (diff) | |
download | nixpkgs-79e66fce1c2b5a7de3e9a0e75b591ca9552a62ef.tar nixpkgs-79e66fce1c2b5a7de3e9a0e75b591ca9552a62ef.tar.gz nixpkgs-79e66fce1c2b5a7de3e9a0e75b591ca9552a62ef.tar.bz2 nixpkgs-79e66fce1c2b5a7de3e9a0e75b591ca9552a62ef.tar.lz nixpkgs-79e66fce1c2b5a7de3e9a0e75b591ca9552a62ef.tar.xz nixpkgs-79e66fce1c2b5a7de3e9a0e75b591ca9552a62ef.tar.zst nixpkgs-79e66fce1c2b5a7de3e9a0e75b591ca9552a62ef.zip |
nixos/podman: sort files into directories
Makes codeowners, git history, etc. a bit simpler now that podman has expanded beyond the original single file module and test.
Diffstat (limited to 'nixos/modules/virtualisation/podman/dnsname.nix')
-rw-r--r-- | nixos/modules/virtualisation/podman/dnsname.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/nixos/modules/virtualisation/podman/dnsname.nix b/nixos/modules/virtualisation/podman/dnsname.nix new file mode 100644 index 00000000000..beef1975507 --- /dev/null +++ b/nixos/modules/virtualisation/podman/dnsname.nix @@ -0,0 +1,36 @@ +{ 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; + }; + }; +} |