Enable podman NVidia support and TCP socket

This commit is contained in:
Erwin Boskma 2022-12-06 13:43:00 +01:00
parent 543dba91de
commit 361f6adc5f
Signed by: erwin
SSH key fingerprint: SHA256:CyeNoWXd3kjX2Nwu6pDxxdS7OqmPVOy0NavA/KU/ntU

View file

@ -7,13 +7,22 @@ with lib; let
cfg = config.eboskma.docker; cfg = config.eboskma.docker;
in 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 { config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ docker-compose ]; environment.systemPackages = with pkgs; [ docker-compose ];
virtualisation.podman = { virtualisation.podman = {
enable = true; enable = true;
enableNvidia = cfg.enableNvidia;
networkSocket = mkIf cfg.enableTcpSocket {
enable = true;
openFirewall = true;
};
dockerSocket.enable = true; dockerSocket.enable = true;
dockerCompat = true; dockerCompat = true;
defaultNetwork.dnsname.enable = true; defaultNetwork.dnsname.enable = true;