From 399c8c0b360aa911587ecdbd119c1fa19bde55de Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 25 Feb 2023 22:43:36 +0100 Subject: [PATCH] nixos-module: compatibilty with 22.11 and >=23 --- nixos-module.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nixos-module.nix b/nixos-module.nix index ec57442..06074db 100644 --- a/nixos-module.nix +++ b/nixos-module.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, options, pkgs, ... }: let inherit (lib) attrValues @@ -97,7 +97,10 @@ in virtualisation.docker.enable = false; virtualisation.podman.enable = true; virtualisation.podman.dockerSocket.enable = true; - virtualisation.podman.defaultNetwork.dnsname.enable = true; + virtualisation.podman.defaultNetwork = + if options?virtualisation.podman.defaultNetwork.settings + then { settings.dns_enabled = true; } # since 2023-01 https://github.com/NixOS/nixpkgs/pull/199965 + else { dnsname.enable = true; }; # compat <2023 virtualisation.arion.docker.client.package = pkgs.docker-client; })