From d0efd4fe0da2543f929ea17f2a9d640f1a180615 Mon Sep 17 00:00:00 2001 From: Julian Sutter Date: Mon, 6 Mar 2023 09:52:32 -0800 Subject: [PATCH] vulkan --- flake.lock | 18 +++++++++--------- flake.nix | 3 +-- modules/ml.nix | 5 +++++ systems/aurora.nix | 12 +++++++++++- systems/common.nix | 1 + 5 files changed, 27 insertions(+), 12 deletions(-) create mode 100644 modules/ml.nix diff --git a/flake.lock b/flake.lock index 5715c96..7a3ce56 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1677400245, - "narHash": "sha256-+/oDZltWUhYFYcIRjH0F5lSNWcBj+4o5kzmDSheiLRw=", + "lastModified": 1678109311, + "narHash": "sha256-Q64FoCH5rp3XHoC8u1+KyjLEFGTY7kX9YaIaYfugvfY=", "owner": "nix-community", "repo": "home-manager", - "rev": "693d76eeb84124cc3110793ff127aeab3832f95c", + "rev": "04d6cad67557512452decbfe888c68fa11338a96", "type": "github" }, "original": { @@ -23,11 +23,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1677342105, - "narHash": "sha256-kv1fpkfCJGb0M+LZaCHFUuIS9kRIwyVgupHu86Y28nc=", + "lastModified": 1677932085, + "narHash": "sha256-+AB4dYllWig8iO6vAiGGYl0NEgmMgGHpy9gzWJ3322g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b1f87ca164a9684404c8829b851c3586c4d9f089", + "rev": "3c5319ad3aa51551182ac82ea17ab1c6b0f0df89", "type": "github" }, "original": { @@ -44,11 +44,11 @@ }, "utils": { "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "lastModified": 1676283394, + "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", "owner": "numtide", "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index a5366cd..12f12c5 100644 --- a/flake.nix +++ b/flake.nix @@ -19,7 +19,6 @@ ./systems/framework.nix ./users/jsutter.nix ./modules/plasma.nix - ./modules/nushell ]; }; aurora = nixpkgs.lib.nixosSystem { @@ -29,7 +28,7 @@ ./systems/aurora.nix ./users/jsutter.nix ./modules/plasma.nix - ./modules/nushell + ./modules/ml.nix ]; }; }; diff --git a/modules/ml.nix b/modules/ml.nix new file mode 100644 index 0000000..555f577 --- /dev/null +++ b/modules/ml.nix @@ -0,0 +1,5 @@ +{ config, pkgs, ... }: + +{ +# programs.python.enable = true; +} diff --git a/systems/aurora.nix b/systems/aurora.nix index 8cc40fd..fc3b21d 100644 --- a/systems/aurora.nix +++ b/systems/aurora.nix @@ -4,11 +4,21 @@ networking.hostName = "aurora"; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; + boot.initrd.kernelModules = [ "amdgpu" ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.video.hidpi.enable = lib.mkDefault true; + + services.xserver.videoDrivers = [ "amdgpu" ]; + + hardware.opengl.extraPackages = with pkgs; [ + rocm-opencl-icd + rocm-opencl-runtime + amdvlk + ]; + hardware.opengl.driSupport = true; + hardware.opengl.driSupport32Bit = true; } diff --git a/systems/common.nix b/systems/common.nix index 0f04128..9124dad 100644 --- a/systems/common.nix +++ b/systems/common.nix @@ -105,6 +105,7 @@ libgdiplus zerotierone unzip + clinfo ]; services.xserver.excludePackages = [ pkgs.xterm ];