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

View file

@ -10,6 +10,9 @@ let
sha256 = "07fr1yfls94gxpwv3azgzxm7shjs4g5ribvqrh88flpf4cv5hq2d"; 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 in
{ {
environment.systemPackages = (with pkgs; [ environment.systemPackages = (with pkgs; [

View file

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