Get OpenCL working

This commit is contained in:
Artemis Tosini 2020-11-16 22:03:57 +00:00
parent 5aada82172
commit 6033c6df4d
Signed by: artemist
GPG key ID: ADFFE553DCBB831E
3 changed files with 12 additions and 8 deletions

View file

@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{ config, pkgs, lib, ... }:
{
imports =
@ -93,7 +93,6 @@
dataDir = "/home/artemis";
};
udev.packages = [
pkgs.openocd
pkgs.android-udev-rules
(pkgs.callPackage ./externals/rules/adafruit.nix { })
(pkgs.callPackage ./externals/rules/fpga.nix { })
@ -114,12 +113,8 @@
};
hardware = {
cpu.amd.updateMicrocode = true;
bluetooth.enable = true;
opengl = {
extraPackages = [ pkgs.vaapiVdpau pkgs.libvdpau-va-gl ];
driSupport32Bit = true;
};
opengl.driSupport32Bit = true;
pulseaudio = {
enable = true;
package = pkgs.pulseaudioFull;
@ -131,7 +126,7 @@
networking = {
firewall.enable = false;
networkmanager = {
enable = true;
enable = lib.mkDefault true;
ethernet.macAddress = "random";
wifi.macAddress = "random";
};

View file

@ -10,6 +10,9 @@ let
sha256 = "07fr1yfls94gxpwv3azgzxm7shjs4g5ribvqrh88flpf4cv5hq2d";
};
} );
openocd = if pkgs.stdenv.cc.isGNU then (pkgs.openocd.overrideAttrs ( old: {
NIX_CFLAGS_COMPILE = old.NIX_CFLAGS_COMPILE ++ [ "-Wno-error=strict-prototypes" ];
})) else pkgs.openocd;
in
{
environment.systemPackages = (with pkgs; [

View file

@ -32,6 +32,12 @@
networking.dhcpcd.allowInterfaces = [ "br0" ];
hardware.cpu.amd.updateMicrocode = true;
hardware.opengl.extraPackages = with pkgs; [
vaapiVdpau
libvdpau-va-gl
rocm-opencl-icd
rocm-runtime
];
services = {
tor = {
enable = true;