From 361f6adc5f41f635dfafbb81e894c035bd079ad6 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Tue, 6 Dec 2022 13:43:00 +0100 Subject: [PATCH] Enable podman NVidia support and TCP socket --- modules/docker/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/docker/default.nix b/modules/docker/default.nix index 03743bf..539a113 100644 --- a/modules/docker/default.nix +++ b/modules/docker/default.nix @@ -7,13 +7,22 @@ with lib; let cfg = config.eboskma.docker; in { - options.eboskma.docker = { enable = mkEnableOption "activate docker"; }; + options.eboskma.docker = { + enable = mkEnableOption "podman"; + enableNvidia = mkEnableOption "podman NVidia support"; + enableTcpSocket = mkEnableOption "podman TCP socket"; + }; config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ docker-compose ]; virtualisation.podman = { enable = true; + enableNvidia = cfg.enableNvidia; + networkSocket = mkIf cfg.enableTcpSocket { + enable = true; + openFirewall = true; + }; dockerSocket.enable = true; dockerCompat = true; defaultNetwork.dnsname.enable = true;