diff options
author | Timo Wilken | 2024-01-13 22:04:15 +0100 |
---|---|---|
committer | Timo Wilken | 2024-01-13 22:04:15 +0100 |
commit | d0889cc9ab4de3deb57b4ebb084a6d7c5c9d7688 (patch) | |
tree | 6827ff83289d24390db612a00d636f30946ed5f6 /tw | |
parent | c83ea26c932bd9b3f9b340b85f9cbf5b0096ddb6 (diff) |
Move common firmware to separate module
Diffstat (limited to 'tw')
-rw-r--r-- | tw/packages/firmware.scm | 34 | ||||
-rw-r--r-- | tw/system/frm.scm | 25 |
2 files changed, 35 insertions, 24 deletions
diff --git a/tw/packages/firmware.scm b/tw/packages/firmware.scm new file mode 100644 index 00000000..2c408390 --- /dev/null +++ b/tw/packages/firmware.scm @@ -0,0 +1,34 @@ +(define-module (tw packages firmware) + #:use-module (gnu packages admin) + #:use-module (gnu packages linux) + #:use-module ((guix utils) + #:select (substitute-keyword-arguments)) + #:use-module (guix packages) + #:use-module ((nongnu packages linux) + #:prefix nongnu:) + #:use-module ((nonguix licenses) + #:prefix nongnu:)) + +(define select-firmware + (@@ (nongnu packages linux) select-firmware)) + +(define-public mt7922-firmware + (package + (inherit nongnu:linux-firmware) + (name "mt7922-firmware") + (arguments + `(#:license-file-regexp "LICENSE.mediatek" + ,@(substitute-keyword-arguments (package-arguments nongnu:linux-firmware) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'select-firmware + ,(select-firmware "^mediatek/.*7922.*"))))))) + (home-page "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/mediatek") + (synopsis "Nonfree firmware for Mediatek MT7922 (AMD RZ616) wireless chips") + (description "Nonfree firmware for AMD RZ616 Wi-Fi and Bluetooth chips. +These are actually Mediatek MT7922 chips.") + (license + (nongnu:nonfree + (string-append + "https://git.kernel.org/pub/scm/linux/kernel/git/firmware" + "/linux-firmware.git/plain/LICENSE.mediatek"))))) diff --git a/tw/system/frm.scm b/tw/system/frm.scm index 2c1c5054..6d143e53 100644 --- a/tw/system/frm.scm +++ b/tw/system/frm.scm @@ -26,6 +26,7 @@ #:use-module ((nonguix licenses) #:prefix nongnu:) #:use-module (tw channels) + #:use-module (tw packages firmware) #:use-module (tw services secrets) #:use-module (tw system)) @@ -34,30 +35,6 @@ (define root-partition ; /dev/nvme0n1p2 (uuid "62fb4710-33d1-4eaf-aaaa-43d16ab26a58" 'btrfs)) -(define select-firmware - (@@ (nongnu packages linux) select-firmware)) - -(define-public mt7922-firmware - (package - (inherit nongnu:linux-firmware) - (name "mt7922-firmware") - (arguments - `(#:license-file-regexp "LICENSE.mediatek" - ,@(substitute-keyword-arguments (package-arguments nongnu:linux-firmware) - ((#:phases phases) - `(modify-phases ,phases - (add-after 'unpack 'select-firmware - ,(select-firmware "^mediatek/.*7922.*"))))))) - (home-page "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/mediatek") - (synopsis "Nonfree firmware for Mediatek MT7922 (AMD RZ616) wireless chips") - (description "Nonfree firmware for AMD RZ616 Wi-Fi and Bluetooth chips. -These are actually Mediatek MT7922 chips.") - (license - (nongnu:nonfree - (string-append - "https://git.kernel.org/pub/scm/linux/kernel/git/firmware" - "/linux-firmware.git/plain/LICENSE.mediatek"))))) - (define-public %frm-system (operating-system (host-name "frm.twilken.net") |