Unverified Commit 7a982a65 authored by Adam C. Stephens's avatar Adam C. Stephens Committed by GitHub
Browse files

nixos/incus: fix some nvidia container errors (#378352)

parents df349095 0619ac75
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -9,6 +9,8 @@ let
  cfg = config.virtualisation.incus;
  preseedFormat = pkgs.formats.yaml { };

  nvidiaEnabled = (lib.elem "nvidia" config.services.xserver.videoDrivers);

  serverBinPath = ''/run/wrappers/bin:${pkgs.qemu_kvm}/libexec:${
    lib.makeBinPath (
      with pkgs;
@@ -26,6 +28,7 @@ let
        e2fsprogs
        findutils
        getent
        gawk
        gnugrep
        gnused
        gnutar
@@ -35,7 +38,6 @@ let
        iptables
        iw
        kmod
        libnvidia-container
        libxfs
        lvm2
        lxcfs
@@ -73,6 +75,9 @@ let
        config.boot.zfs.package
        "${config.boot.zfs.package}/lib/udev"
      ]
      ++ lib.optionals nvidiaEnabled [
        libnvidia-container
      ]
    )
  }'';

@@ -309,7 +314,7 @@ in
      "xt_CHECKSUM"
      "xt_MASQUERADE"
      "vhost_vsock"
    ] ++ lib.optionals (!config.networking.nftables.enable) [ "iptable_mangle" ];
    ] ++ lib.optionals nvidiaEnabled [ "nvidia_uvm" ];

    environment.systemPackages = [
      cfg.clientPackage
+6 −1
Original line number Diff line number Diff line
@@ -2,6 +2,8 @@
  lib,
  stdenv,
  fetchFromGitHub,

  bashInteractive,
  dbus,
  docbook2x,
  libapparmor,
@@ -14,6 +16,7 @@
  openssl,
  pkg-config,
  systemd,

  nix-update-script,
}:

@@ -36,6 +39,8 @@ stdenv.mkDerivation (finalAttrs: {
  ];

  buildInputs = [
    # some hooks use compgen
    bashInteractive
    dbus
    libapparmor
    libcap
@@ -93,7 +98,7 @@ stdenv.mkDerivation (finalAttrs: {
    updateScript = nix-update-script {
      extraArgs = [
        "--version-regex"
        "v(6.0.*)"
        "v(6\\.0\\.*)"
      ];
    };
  };