From 3a1c5d7fc879ad17cd709e00b39bc609d74c3df1 Mon Sep 17 00:00:00 2001 From: kallem Date: Mon, 2 Sep 2024 13:53:31 +0300 Subject: [PATCH] move hw definitions to reference folder Signed-off-by: kallem --- REUSE.toml | 16 ++++++++-------- docs/src/technologies/device_tree_overlays_pt.md | 4 ++-- docs/src/technologies/nvidia_uarti_net_vm.md | 2 +- modules/flake-module.nix | 15 +++++++++++---- modules/hardware/flake-module.nix | 10 +--------- modules/reference/hardware/default.nix | 3 +++ .../definitions}/dell-latitude-7230.nix | 0 .../definitions}/dell-latitude-7330.nix | 0 .../{ => reference/hardware}/imx8/default.nix | 0 .../hardware}/imx8/imx8mp-sdimage.nix | 0 .../agx-netvm-wlan-pci-passthrough.nix | 0 .../hardware}/jetpack-microvm/default.nix | 0 .../nx-netvm-ethernet-pci-passthrough.nix | 0 .../pci-passthrough-agx-test.patch | 0 .../pci-passthrough-nx-test.patch | 0 .../{ => reference/hardware}/jetpack/default.nix | 0 .../ghaf_host_hardened_baseline-jetson-orin | 0 .../jetpack/nvidia-jetson-orin/default.nix | 0 .../edk2-nvidia-always-reset-display.patch | 0 .../jetpack/nvidia-jetson-orin/format-module.nix | 0 .../jetpack/nvidia-jetson-orin/jetson-orin.nix | 2 +- .../nvidia-jetson-orin/mk-esp-contents.py | 0 .../jetpack/nvidia-jetson-orin/optee.nix | 0 .../jetpack/nvidia-jetson-orin/ota-utils-fix.nix | 0 .../nvidia-jetson-orin/partition-template.nix | 0 .../pci-passthrough-common.nix | 0 .../jetpack/nvidia-jetson-orin/sdimage.nix | 0 .../nvidia-jetson-orin/tegra2-mb2-bct-scr.patch | 0 .../common/bpmp-virt-common/default.nix | 0 ...0002-vfio_platform-reset-required-false.patch | 0 .../patches/0003-bpmp-support-bpmp-virt.patch | 0 .../patches/0004-bpmp-virt-drivers.patch | 0 .../patches/0005-bpmp-overlay.patch | 0 .../virtualization/default.nix | 0 .../host/bpmp-virt-host/default.nix | 0 .../bpmp-virt-host/overlays/qemu/default.nix | 0 .../patches/0001-qemu-v8.1.3_bpmp-virt.patch | 0 .../patches/0001-bpmp-host-proxy-dts.patch | 0 .../patches/0002-bpmp-host-uarta-dts.patch | 0 .../virtualization/host/uarta-host/default.nix | 0 .../passthrough/uarti-net-vm/default.nix | 0 .../patches/net_vm_dtb_with_uarti.patch | 0 .../uarti-net-vm/uarti_pt_host_overlay.dts | 0 .../hardware}/jetpack/profiles/debug.nix | 0 .../hardware}/jetpack/profiles/default.nix | 0 modules/{ => reference}/hardware/laptop.nix | 2 +- .../hardware/lenovo-x1/definitions/x1-gen10.nix | 0 .../hardware/lenovo-x1/definitions/x1-gen11.nix | 0 .../lenovo-x1/kernel/guest/test/default.nix | 0 .../kernel/guest/test/test-configuration.nix | 4 ++-- .../hardware}/polarfire/default.nix | 0 .../hardware}/polarfire/mpfs-nixos-sdimage.nix | 0 targets/laptop/flake-module.nix | 8 ++++---- targets/nvidia-jetson-orin/flake-module.nix | 4 ++-- 54 files changed, 36 insertions(+), 34 deletions(-) create mode 100644 modules/reference/hardware/default.nix rename modules/{hardware/definitions/dell-latitude => reference/hardware/dell-latitude/definitions}/dell-latitude-7230.nix (100%) rename modules/{hardware/definitions/dell-latitude => reference/hardware/dell-latitude/definitions}/dell-latitude-7330.nix (100%) rename modules/{ => reference/hardware}/imx8/default.nix (100%) rename modules/{ => reference/hardware}/imx8/imx8mp-sdimage.nix (100%) rename modules/{ => reference/hardware}/jetpack-microvm/agx-netvm-wlan-pci-passthrough.nix (100%) rename modules/{ => reference/hardware}/jetpack-microvm/default.nix (100%) rename modules/{ => reference/hardware}/jetpack-microvm/nx-netvm-ethernet-pci-passthrough.nix (100%) rename modules/{ => reference/hardware}/jetpack-microvm/pci-passthrough-agx-test.patch (100%) rename modules/{ => reference/hardware}/jetpack-microvm/pci-passthrough-nx-test.patch (100%) rename modules/{ => reference/hardware}/jetpack/default.nix (100%) rename modules/{ => reference/hardware}/jetpack/ghaf_host_hardened_baseline-jetson-orin (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/default.nix (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/edk2-nvidia-always-reset-display.patch (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/format-module.nix (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/jetson-orin.nix (98%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/mk-esp-contents.py (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/optee.nix (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/ota-utils-fix.nix (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/partition-template.nix (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/pci-passthrough-common.nix (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/sdimage.nix (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/tegra2-mb2-bct-scr.patch (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/default.nix (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/0002-vfio_platform-reset-required-false.patch (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/0003-bpmp-support-bpmp-virt.patch (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/0004-bpmp-virt-drivers.patch (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/0005-bpmp-overlay.patch (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/virtualization/default.nix (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/default.nix (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/overlays/qemu/default.nix (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/overlays/qemu/patches/0001-qemu-v8.1.3_bpmp-virt.patch (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/patches/0001-bpmp-host-proxy-dts.patch (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/patches/0002-bpmp-host-uarta-dts.patch (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/virtualization/host/uarta-host/default.nix (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/default.nix (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/patches/net_vm_dtb_with_uarti.patch (100%) rename modules/{ => reference/hardware}/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/uarti_pt_host_overlay.dts (100%) rename modules/{ => reference/hardware}/jetpack/profiles/debug.nix (100%) rename modules/{ => reference/hardware}/jetpack/profiles/default.nix (100%) rename modules/{ => reference}/hardware/laptop.nix (97%) rename modules/{ => reference}/hardware/lenovo-x1/definitions/x1-gen10.nix (100%) rename modules/{ => reference}/hardware/lenovo-x1/definitions/x1-gen11.nix (100%) rename modules/{ => reference}/hardware/lenovo-x1/kernel/guest/test/default.nix (100%) rename modules/{ => reference}/hardware/lenovo-x1/kernel/guest/test/test-configuration.nix (87%) rename modules/{ => reference/hardware}/polarfire/default.nix (100%) rename modules/{ => reference/hardware}/polarfire/mpfs-nixos-sdimage.nix (100%) diff --git a/REUSE.toml b/REUSE.toml index 1d5a9f89c..0ca40f37e 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -16,7 +16,7 @@ path = [ "assets/**/*.png", "assets/**/*.svg", "modules/common/development/audio_test/test_file1.mp3", "modules/hardware/x86_64-generic/kernel/configs/ghaf_host_hardened_baseline-x86", - "modules/jetpack/ghaf_host_hardened_baseline-jetson-orin", + "modules/reference/hardware/jetpack/ghaf_host_hardened_baseline-jetson-orin", "modules/lanzaboote/demo-secure-boot-keys/**/*", "modules/microvm/virtualization/microvm/idsvm/mitmproxy/mitmproxy-ca/*", ] @@ -46,7 +46,7 @@ SPDX-FileCopyrightText = [ ] path = [ "overlays/custom-packages/qemu/*.patch", - "modules/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/overlays/qemu/patches/0001-qemu-v8.1.3_bpmp-virt.patch" + "modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/overlays/qemu/patches/0001-qemu-v8.1.3_bpmp-virt.patch" ] [[annotations]] @@ -99,10 +99,10 @@ SPDX-FileCopyrightText = [ "2022-2024 TII (SSRC) and the Ghaf contributors", ] path = [ - "modules/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/*.patch", - "modules/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/patches/*.patch", - "modules/jetpack-microvm/*.patch", - "modules/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/patches/net_vm_dtb_with_uarti.patch", + "modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/*.patch", + "modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/patches/*.patch", + "modules/reference/hardware/jetpack-microvm/*.patch", + "modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/patches/net_vm_dtb_with_uarti.patch", "modules/common/virtualization/pkvm/0001-pkvm-enable-pkvm-on-intel-x86-6.1-lts.patch", "modules/microvm/virtualization/microvm/0001-x86-gpu-Don-t-reserve-stolen-memory-for-GPU-passthro.patch", ] @@ -110,13 +110,13 @@ path = [ [[annotations]] SPDX-License-Identifier = "BSD-2-Clause-Patent" SPDX-FileCopyrightText = "Copyright (c) 2021-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved." -path = "modules/jetpack/nvidia-jetson-orin/edk2-nvidia-always-reset-display.patch" +path = "modules/reference/hardware/jetpack/nvidia-jetson-orin/edk2-nvidia-always-reset-display.patch" [[annotations]] SPDX-License-Identifier = "LicenseRef-NvidiaProprietary" SPDX-FileCopyrightText = "Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved." path = [ - "modules/jetpack/nvidia-jetson-orin/tegra2-mb2-bct-scr.patch", + "modules/reference/hardware/jetpack/nvidia-jetson-orin/tegra2-mb2-bct-scr.patch", ] diff --git a/docs/src/technologies/device_tree_overlays_pt.md b/docs/src/technologies/device_tree_overlays_pt.md index ba8d27aab..c235ed6bf 100644 --- a/docs/src/technologies/device_tree_overlays_pt.md +++ b/docs/src/technologies/device_tree_overlays_pt.md @@ -133,7 +133,7 @@ hardware.deviceTree.overlays = [ ]; ``` -Also, in [jetson-orin.nix](../../../modules/jetpack/nvidia-jetson-orin/jetson-orin.nix) the +Also, in [jetson-orin.nix](../../../modules/reference/hardware/jetpack/nvidia-jetson-orin/jetson-orin.nix) the *dtboBuildExtraIncludePaths* is defined with the path needed to include the *tegra234-smmu-streamid.h* header file. @@ -149,4 +149,4 @@ hardware.deviceTree = ``` You can find this full implementation in the Nix module: -[uarti-net-vm](../../../modules/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm) \ No newline at end of file +[uarti-net-vm](../../../modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm) \ No newline at end of file diff --git a/docs/src/technologies/nvidia_uarti_net_vm.md b/docs/src/technologies/nvidia_uarti_net_vm.md index 9d0eb58b6..6211fc65f 100644 --- a/docs/src/technologies/nvidia_uarti_net_vm.md +++ b/docs/src/technologies/nvidia_uarti_net_vm.md @@ -24,7 +24,7 @@ This section describes how the UARTI passthrough is configured in Ghaf for micro We recommend to read [NVIDIA Jetson AGX Orin: UART Passthrough](nvidia_agx_pt_uart.md) before continuing. The UARTI passthrough configuration declaration -[UARTI to netvm](../../../modules/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/default.nix) +[UARTI to netvm](../../../modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/default.nix) includes: diff --git a/modules/flake-module.nix b/modules/flake-module.nix index fe22ac7e8..6f5eac0b1 100644 --- a/modules/flake-module.nix +++ b/modules/flake-module.nix @@ -20,14 +20,21 @@ nixpkgs.overlays = [ inputs.ghafpkgs.overlays.default ]; } ]; + laptop.imports = [ + ./hardware/definition.nix + ./hardware/x86_64-generic + ./reference/hardware/laptop.nix + ./hardware/common + { nixpkgs.overlays = [ inputs.ghafpkgs.overlays.default ]; } + ]; desktop.imports = [ ./desktop ]; host.imports = [ ./host ]; - imx8.imports = [ ./imx8 ]; - jetpack.imports = [ ./jetpack ]; - jetpack-microvm.imports = [ ./jetpack-microvm ]; lanzaboote.imports = [ ./lanzaboote ]; microvm.imports = [ ./microvm ]; - polarfire.imports = [ ./polarfire ]; + imx8.imports = [ ./reference/hardware/imx8 ]; + jetpack.imports = [ ./reference/hardware/jetpack ]; + jetpack-microvm.imports = [ ./reference/hardware/jetpack-microvm ]; + polarfire.imports = [ ./reference/hardware/polarfire ]; reference-appvms.imports = [ ./reference/appvms ]; reference-personalize.imports = [ ./reference/personalize ]; reference-profiles.imports = [ ./reference/profiles ]; diff --git a/modules/hardware/flake-module.nix b/modules/hardware/flake-module.nix index 5dd2742bf..72da56b65 100644 --- a/modules/hardware/flake-module.nix +++ b/modules/hardware/flake-module.nix @@ -1,15 +1,7 @@ # Copyright 2024 TII (SSRC) and the Ghaf contributors # SPDX-License-Identifier: Apache-2.0 -{ inputs, ... }: -{ +_: { flake.nixosModules = { - laptop.imports = [ - ./definition.nix - ./x86_64-generic - ./laptop.nix - ./common - { nixpkgs.overlays = [ inputs.ghafpkgs.overlays.default ]; } - ]; hw-x86_64-generic.imports = [ ./definition.nix ./x86_64-generic diff --git a/modules/reference/hardware/default.nix b/modules/reference/hardware/default.nix new file mode 100644 index 000000000..5ba9b7a18 --- /dev/null +++ b/modules/reference/hardware/default.nix @@ -0,0 +1,3 @@ +# Copyright 2024 TII (SSRC) and the Ghaf contributors +# SPDX-License-Identifier: Apache-2.0 +{ imports = [ ./laptop.nix ]; } diff --git a/modules/hardware/definitions/dell-latitude/dell-latitude-7230.nix b/modules/reference/hardware/dell-latitude/definitions/dell-latitude-7230.nix similarity index 100% rename from modules/hardware/definitions/dell-latitude/dell-latitude-7230.nix rename to modules/reference/hardware/dell-latitude/definitions/dell-latitude-7230.nix diff --git a/modules/hardware/definitions/dell-latitude/dell-latitude-7330.nix b/modules/reference/hardware/dell-latitude/definitions/dell-latitude-7330.nix similarity index 100% rename from modules/hardware/definitions/dell-latitude/dell-latitude-7330.nix rename to modules/reference/hardware/dell-latitude/definitions/dell-latitude-7330.nix diff --git a/modules/imx8/default.nix b/modules/reference/hardware/imx8/default.nix similarity index 100% rename from modules/imx8/default.nix rename to modules/reference/hardware/imx8/default.nix diff --git a/modules/imx8/imx8mp-sdimage.nix b/modules/reference/hardware/imx8/imx8mp-sdimage.nix similarity index 100% rename from modules/imx8/imx8mp-sdimage.nix rename to modules/reference/hardware/imx8/imx8mp-sdimage.nix diff --git a/modules/jetpack-microvm/agx-netvm-wlan-pci-passthrough.nix b/modules/reference/hardware/jetpack-microvm/agx-netvm-wlan-pci-passthrough.nix similarity index 100% rename from modules/jetpack-microvm/agx-netvm-wlan-pci-passthrough.nix rename to modules/reference/hardware/jetpack-microvm/agx-netvm-wlan-pci-passthrough.nix diff --git a/modules/jetpack-microvm/default.nix b/modules/reference/hardware/jetpack-microvm/default.nix similarity index 100% rename from modules/jetpack-microvm/default.nix rename to modules/reference/hardware/jetpack-microvm/default.nix diff --git a/modules/jetpack-microvm/nx-netvm-ethernet-pci-passthrough.nix b/modules/reference/hardware/jetpack-microvm/nx-netvm-ethernet-pci-passthrough.nix similarity index 100% rename from modules/jetpack-microvm/nx-netvm-ethernet-pci-passthrough.nix rename to modules/reference/hardware/jetpack-microvm/nx-netvm-ethernet-pci-passthrough.nix diff --git a/modules/jetpack-microvm/pci-passthrough-agx-test.patch b/modules/reference/hardware/jetpack-microvm/pci-passthrough-agx-test.patch similarity index 100% rename from modules/jetpack-microvm/pci-passthrough-agx-test.patch rename to modules/reference/hardware/jetpack-microvm/pci-passthrough-agx-test.patch diff --git a/modules/jetpack-microvm/pci-passthrough-nx-test.patch b/modules/reference/hardware/jetpack-microvm/pci-passthrough-nx-test.patch similarity index 100% rename from modules/jetpack-microvm/pci-passthrough-nx-test.patch rename to modules/reference/hardware/jetpack-microvm/pci-passthrough-nx-test.patch diff --git a/modules/jetpack/default.nix b/modules/reference/hardware/jetpack/default.nix similarity index 100% rename from modules/jetpack/default.nix rename to modules/reference/hardware/jetpack/default.nix diff --git a/modules/jetpack/ghaf_host_hardened_baseline-jetson-orin b/modules/reference/hardware/jetpack/ghaf_host_hardened_baseline-jetson-orin similarity index 100% rename from modules/jetpack/ghaf_host_hardened_baseline-jetson-orin rename to modules/reference/hardware/jetpack/ghaf_host_hardened_baseline-jetson-orin diff --git a/modules/jetpack/nvidia-jetson-orin/default.nix b/modules/reference/hardware/jetpack/nvidia-jetson-orin/default.nix similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/default.nix rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/default.nix diff --git a/modules/jetpack/nvidia-jetson-orin/edk2-nvidia-always-reset-display.patch b/modules/reference/hardware/jetpack/nvidia-jetson-orin/edk2-nvidia-always-reset-display.patch similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/edk2-nvidia-always-reset-display.patch rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/edk2-nvidia-always-reset-display.patch diff --git a/modules/jetpack/nvidia-jetson-orin/format-module.nix b/modules/reference/hardware/jetpack/nvidia-jetson-orin/format-module.nix similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/format-module.nix rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/format-module.nix diff --git a/modules/jetpack/nvidia-jetson-orin/jetson-orin.nix b/modules/reference/hardware/jetpack/nvidia-jetson-orin/jetson-orin.nix similarity index 98% rename from modules/jetpack/nvidia-jetson-orin/jetson-orin.nix rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/jetson-orin.nix index b378a15af..42a863775 100644 --- a/modules/jetpack/nvidia-jetson-orin/jetson-orin.nix +++ b/modules/reference/hardware/jetpack/nvidia-jetson-orin/jetson-orin.nix @@ -54,7 +54,7 @@ in }; firmware.uefi = { - logo = ../../../docs/src/img/1600px-Ghaf_logo.svg; + logo = ../../../../../docs/src/img/1600px-Ghaf_logo.svg; edk2NvidiaPatches = [ # This effectively disables EFI FB Simple Framebuffer, which does # not work properly but causes kernel panic during the boot if the diff --git a/modules/jetpack/nvidia-jetson-orin/mk-esp-contents.py b/modules/reference/hardware/jetpack/nvidia-jetson-orin/mk-esp-contents.py similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/mk-esp-contents.py rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/mk-esp-contents.py diff --git a/modules/jetpack/nvidia-jetson-orin/optee.nix b/modules/reference/hardware/jetpack/nvidia-jetson-orin/optee.nix similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/optee.nix rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/optee.nix diff --git a/modules/jetpack/nvidia-jetson-orin/ota-utils-fix.nix b/modules/reference/hardware/jetpack/nvidia-jetson-orin/ota-utils-fix.nix similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/ota-utils-fix.nix rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/ota-utils-fix.nix diff --git a/modules/jetpack/nvidia-jetson-orin/partition-template.nix b/modules/reference/hardware/jetpack/nvidia-jetson-orin/partition-template.nix similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/partition-template.nix rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/partition-template.nix diff --git a/modules/jetpack/nvidia-jetson-orin/pci-passthrough-common.nix b/modules/reference/hardware/jetpack/nvidia-jetson-orin/pci-passthrough-common.nix similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/pci-passthrough-common.nix rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/pci-passthrough-common.nix diff --git a/modules/jetpack/nvidia-jetson-orin/sdimage.nix b/modules/reference/hardware/jetpack/nvidia-jetson-orin/sdimage.nix similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/sdimage.nix rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/sdimage.nix diff --git a/modules/jetpack/nvidia-jetson-orin/tegra2-mb2-bct-scr.patch b/modules/reference/hardware/jetpack/nvidia-jetson-orin/tegra2-mb2-bct-scr.patch similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/tegra2-mb2-bct-scr.patch rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/tegra2-mb2-bct-scr.patch diff --git a/modules/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/default.nix b/modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/default.nix similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/default.nix rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/default.nix diff --git a/modules/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/0002-vfio_platform-reset-required-false.patch b/modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/0002-vfio_platform-reset-required-false.patch similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/0002-vfio_platform-reset-required-false.patch rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/0002-vfio_platform-reset-required-false.patch diff --git a/modules/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/0003-bpmp-support-bpmp-virt.patch b/modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/0003-bpmp-support-bpmp-virt.patch similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/0003-bpmp-support-bpmp-virt.patch rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/0003-bpmp-support-bpmp-virt.patch diff --git a/modules/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/0004-bpmp-virt-drivers.patch b/modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/0004-bpmp-virt-drivers.patch similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/0004-bpmp-virt-drivers.patch rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/0004-bpmp-virt-drivers.patch diff --git a/modules/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/0005-bpmp-overlay.patch b/modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/0005-bpmp-overlay.patch similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/0005-bpmp-overlay.patch rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/0005-bpmp-overlay.patch diff --git a/modules/jetpack/nvidia-jetson-orin/virtualization/default.nix b/modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/default.nix similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/virtualization/default.nix rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/default.nix diff --git a/modules/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/default.nix b/modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/default.nix similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/default.nix rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/default.nix diff --git a/modules/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/overlays/qemu/default.nix b/modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/overlays/qemu/default.nix similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/overlays/qemu/default.nix rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/overlays/qemu/default.nix diff --git a/modules/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/overlays/qemu/patches/0001-qemu-v8.1.3_bpmp-virt.patch b/modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/overlays/qemu/patches/0001-qemu-v8.1.3_bpmp-virt.patch similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/overlays/qemu/patches/0001-qemu-v8.1.3_bpmp-virt.patch rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/overlays/qemu/patches/0001-qemu-v8.1.3_bpmp-virt.patch diff --git a/modules/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/patches/0001-bpmp-host-proxy-dts.patch b/modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/patches/0001-bpmp-host-proxy-dts.patch similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/patches/0001-bpmp-host-proxy-dts.patch rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/patches/0001-bpmp-host-proxy-dts.patch diff --git a/modules/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/patches/0002-bpmp-host-uarta-dts.patch b/modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/patches/0002-bpmp-host-uarta-dts.patch similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/patches/0002-bpmp-host-uarta-dts.patch rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/patches/0002-bpmp-host-uarta-dts.patch diff --git a/modules/jetpack/nvidia-jetson-orin/virtualization/host/uarta-host/default.nix b/modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/host/uarta-host/default.nix similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/virtualization/host/uarta-host/default.nix rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/host/uarta-host/default.nix diff --git a/modules/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/default.nix b/modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/default.nix similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/default.nix rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/default.nix diff --git a/modules/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/patches/net_vm_dtb_with_uarti.patch b/modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/patches/net_vm_dtb_with_uarti.patch similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/patches/net_vm_dtb_with_uarti.patch rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/patches/net_vm_dtb_with_uarti.patch diff --git a/modules/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/uarti_pt_host_overlay.dts b/modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/uarti_pt_host_overlay.dts similarity index 100% rename from modules/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/uarti_pt_host_overlay.dts rename to modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/uarti_pt_host_overlay.dts diff --git a/modules/jetpack/profiles/debug.nix b/modules/reference/hardware/jetpack/profiles/debug.nix similarity index 100% rename from modules/jetpack/profiles/debug.nix rename to modules/reference/hardware/jetpack/profiles/debug.nix diff --git a/modules/jetpack/profiles/default.nix b/modules/reference/hardware/jetpack/profiles/default.nix similarity index 100% rename from modules/jetpack/profiles/default.nix rename to modules/reference/hardware/jetpack/profiles/default.nix diff --git a/modules/hardware/laptop.nix b/modules/reference/hardware/laptop.nix similarity index 97% rename from modules/hardware/laptop.nix rename to modules/reference/hardware/laptop.nix index bf538fe9a..b21d7b5c4 100644 --- a/modules/hardware/laptop.nix +++ b/modules/reference/hardware/laptop.nix @@ -31,7 +31,7 @@ let ) deviceList; in { - imports = [ ./definition.nix ]; + imports = [ ../../hardware/definition.nix ]; options.ghaf.hardware.definition.configFile = mkOption { description = "Path to the hardware configuration file."; diff --git a/modules/hardware/lenovo-x1/definitions/x1-gen10.nix b/modules/reference/hardware/lenovo-x1/definitions/x1-gen10.nix similarity index 100% rename from modules/hardware/lenovo-x1/definitions/x1-gen10.nix rename to modules/reference/hardware/lenovo-x1/definitions/x1-gen10.nix diff --git a/modules/hardware/lenovo-x1/definitions/x1-gen11.nix b/modules/reference/hardware/lenovo-x1/definitions/x1-gen11.nix similarity index 100% rename from modules/hardware/lenovo-x1/definitions/x1-gen11.nix rename to modules/reference/hardware/lenovo-x1/definitions/x1-gen11.nix diff --git a/modules/hardware/lenovo-x1/kernel/guest/test/default.nix b/modules/reference/hardware/lenovo-x1/kernel/guest/test/default.nix similarity index 100% rename from modules/hardware/lenovo-x1/kernel/guest/test/default.nix rename to modules/reference/hardware/lenovo-x1/kernel/guest/test/default.nix diff --git a/modules/hardware/lenovo-x1/kernel/guest/test/test-configuration.nix b/modules/reference/hardware/lenovo-x1/kernel/guest/test/test-configuration.nix similarity index 87% rename from modules/hardware/lenovo-x1/kernel/guest/test/test-configuration.nix rename to modules/reference/hardware/lenovo-x1/kernel/guest/test/test-configuration.nix index b91f68595..a2c640bcb 100644 --- a/modules/hardware/lenovo-x1/kernel/guest/test/test-configuration.nix +++ b/modules/reference/hardware/lenovo-x1/kernel/guest/test/test-configuration.nix @@ -3,8 +3,8 @@ { lib, ... }: { imports = [ - ../../../../x86_64-generic/kernel/host/default.nix - ../../../../x86_64-generic/kernel/guest/default.nix + ../../../../../../hardware/x86_64-generic/kernel/host/default.nix + ../../../../../../hardware/x86_64-generic/kernel/guest/default.nix ]; config = { diff --git a/modules/polarfire/default.nix b/modules/reference/hardware/polarfire/default.nix similarity index 100% rename from modules/polarfire/default.nix rename to modules/reference/hardware/polarfire/default.nix diff --git a/modules/polarfire/mpfs-nixos-sdimage.nix b/modules/reference/hardware/polarfire/mpfs-nixos-sdimage.nix similarity index 100% rename from modules/polarfire/mpfs-nixos-sdimage.nix rename to modules/reference/hardware/polarfire/mpfs-nixos-sdimage.nix diff --git a/targets/laptop/flake-module.nix b/targets/laptop/flake-module.nix index 9157a948a..0bada6065 100644 --- a/targets/laptop/flake-module.nix +++ b/targets/laptop/flake-module.nix @@ -46,7 +46,7 @@ let self.nixosModules.disko-basic-partition-v1 { ghaf = { - hardware.definition.configFile = "/definitions/dell-latitude/dell-latitude-7230.nix"; + hardware.definition.configFile = "/dell-latitude/definitions/dell-latitude-7230.nix"; reference.profiles.mvp-user-trial.enable = true; }; } @@ -55,7 +55,7 @@ let self.nixosModules.disko-basic-partition-v1 { ghaf = { - hardware.definition.configFile = "/definitions/dell-latitude/dell-latitude-7330.nix"; + hardware.definition.configFile = "/dell-latitude/definitions/dell-latitude-7330.nix"; reference.profiles.mvp-user-trial.enable = true; }; } @@ -93,7 +93,7 @@ let self.nixosModules.disko-basic-partition-v1 { ghaf = { - hardware.definition.configFile = "/definitions/dell-latitude/dell-latitude-7230.nix"; + hardware.definition.configFile = "/dell-latitude/definitions/dell-latitude-7230.nix"; reference.profiles.mvp-user-trial.enable = true; }; } @@ -102,7 +102,7 @@ let self.nixosModules.disko-basic-partition-v1 { ghaf = { - hardware.definition.configFile = "/definitions/dell-latitude/dell-latitude-7330.nix"; + hardware.definition.configFile = "/dell-latitude/definitions/dell-latitude-7330.nix"; reference.profiles.mvp-user-trial.enable = true; }; } diff --git a/targets/nvidia-jetson-orin/flake-module.nix b/targets/nvidia-jetson-orin/flake-module.nix index 63e943ccd..a4a55d0ec 100644 --- a/targets/nvidia-jetson-orin/flake-module.nix +++ b/targets/nvidia-jetson-orin/flake-module.nix @@ -19,7 +19,7 @@ let netvmExtraModules = [ { # The Nvidia Orin hardware dependent configuration is in - # modules/jetpack and modules/jetpack-microvm. Please refer to that + # modules/reference/hardware/jetpack and modules/reference/hardware/jetpack-microvm. Please refer to that # section for hardware dependent netvm configuration. # Wireless Configuration. Orin AGX has WiFi enabled where Orin NX does @@ -45,7 +45,7 @@ let modules = [ (nixos-generators + "/format-module.nix") - ../../modules/jetpack/nvidia-jetson-orin/format-module.nix + ../../modules/reference/hardware/jetpack/nvidia-jetson-orin/format-module.nix jetpack-nixos.nixosModules.default self.nixosModules.common self.nixosModules.desktop