From 4ba28b48c8f1fb3c2dee6c7b4ee2e2e6b26ac2a0 Mon Sep 17 00:00:00 2001 From: kuwii Date: Sun, 21 Sep 2025 11:23:40 +0800 Subject: [PATCH 1/2] linglong/nova-studio: init --- README.md | 1 + flake.nix | 1 + linglong/nova-studio/default.nix | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 linglong/nova-studio/default.nix diff --git a/README.md b/README.md index c9b80cb95..59abb7eae 100644 --- a/README.md +++ b/README.md @@ -361,6 +361,7 @@ See code for all available configurations. | [Lenovo Yoga Slim 7i Pro X 14IAH7 (Hybrid)](lenovo/yoga/7/14IAH7/hybrid) | `` | `lenovo-yoga-7-14IAH7-hybrid` | | [Lenovo Yoga Slim 7 14ILL10](lenovo/yoga/7/14ILL10) | `` | `lenovo-yoga-7-14ILL10` | | [LENOVO Yoga 7 Slim Gen8](lenovo/yoga/7/slim/gen8) | `` | `lenovo-yoga-7-slim-gen8` | +| [Linglong Nova Studio](linglong/nova-studio) | `` | `linglong-nova-studio` | | [MSI B550-A PRO](msi/b550-a-pro) | `` | `msi-b550-a-pro` | | [MSI B350 TOMAHAWK](msi/b350-tomahawk) | `` | `msi-b350-tomahawk` | | [MSI GS60 2QE](msi/gs60) | `` | `msi-gs60` | diff --git a/flake.nix b/flake.nix index 7cfe53df3..c57a5e5a3 100644 --- a/flake.nix +++ b/flake.nix @@ -301,6 +301,7 @@ lenovo-yoga-7-14ILL10 = import ./lenovo/yoga/7/14ILL10; lenovo-yoga-7-slim-gen8 = import ./lenovo/yoga/7/slim/gen8; letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; + linglong-nova-studio = import ./linglong/nova-studio; malibal-aon-s1-intel = import ./malibal/aon/s1; mechrevo-gm5hg0a = import ./mechrevo/GM5HG0A; microchip-icicle-kit = import ./microchip/icicle-kit; diff --git a/linglong/nova-studio/default.nix b/linglong/nova-studio/default.nix new file mode 100644 index 000000000..b36324399 --- /dev/null +++ b/linglong/nova-studio/default.nix @@ -0,0 +1,27 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + imports = [ + ../../common/cpu/amd + ../../common/cpu/amd/pstate.nix + ../../common/cpu/amd/zenpower.nix + ../../common/gpu/amd + ../../common/pc/ssd + ]; + + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.14") ( + lib.mkDefault pkgs.linuxPackages_latest + ); + boot.kernelModules = [ "amdgpu" ]; + + hardware.enableRedistributableFirmware = lib.mkDefault true; + hardware.graphics.enable = lib.mkDefault true; + hardware.graphics.enable32Bit = lib.mkDefault true; + + hardware.amdgpu.opencl.enable = lib.mkDefault true; +} From 0e9dc7cf611c900c2298054b1d93121478fbf9fa Mon Sep 17 00:00:00 2001 From: kuwii Date: Thu, 25 Sep 2025 22:42:51 +0800 Subject: [PATCH 2/2] linglong/nova-studio: remove opencl config and move it to readme --- linglong/nova-studio/README.md | 39 ++++++++++++++++++++++++++++++++ linglong/nova-studio/default.nix | 2 -- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 linglong/nova-studio/README.md diff --git a/linglong/nova-studio/README.md b/linglong/nova-studio/README.md new file mode 100644 index 000000000..ef35dc043 --- /dev/null +++ b/linglong/nova-studio/README.md @@ -0,0 +1,39 @@ +# Linglong Nova Studio + +This is a configuration for [Linglong Nova Studio (玲珑星核)](https://www.firstarpc.com/). + +## Configuration + +import `` (using configurations), or add `nixos-hardware.nixosModules.linglong-nova-studio` in modules (using Flakes). + +This configuration will force to use Linux kernel that >= 6.14, otherwise it will be updated to the latest version. This part follows [Framework Desktop](../../framework/desktop/amd-ai-max-300-series), which is also a desktop computer using Ryzen AI Max 300 series processor. + +## OpenCL and ROCm support + +To setup OpenCL and ROCm environment, please add the following configuration: + +``` +# Tell packages that supports ROCm to enable the related supports. +nixpkgs.config.rocmSupport = true; + +# Install ROCm and enable +hardware.amdgpu.opencl.enable = true; + +# These tools can show the info related to ROCm and OpenCL. +environment.systemPackages = with pkgs; [ + rocmPackages.rocminfo + clinfo +]; +``` + +After switching, to check whether the environment has been correctly setup, please run + +``` +clinfo +``` + +and + +``` +rocminfo +``` diff --git a/linglong/nova-studio/default.nix b/linglong/nova-studio/default.nix index b36324399..32aa0896d 100644 --- a/linglong/nova-studio/default.nix +++ b/linglong/nova-studio/default.nix @@ -22,6 +22,4 @@ hardware.enableRedistributableFirmware = lib.mkDefault true; hardware.graphics.enable = lib.mkDefault true; hardware.graphics.enable32Bit = lib.mkDefault true; - - hardware.amdgpu.opencl.enable = lib.mkDefault true; }