summaryrefslogtreecommitdiff
path: root/README.org
diff options
context:
space:
mode:
Diffstat (limited to 'README.org')
-rw-r--r--README.org108
1 files changed, 102 insertions, 6 deletions
diff --git a/README.org b/README.org
index dc13104..1054904 100644
--- a/README.org
+++ b/README.org
@@ -94,8 +94,11 @@ your configuration.
** Installation image
For some hardware the official Guix installation image won't do
-(e.g. unsupported wifi). You can generate an installation image running the
-nonfree Linux kernel and nonfree firmware with the following command:
+(e.g. unsupported wifi). You can find a pre-generated installation image
+(time and version in line with upstream Guix), running the nonfree Linux
+kernel and nonfree firmware, on the [[https://gitlab.com/nonguix/nonguix/-/releases][Releases page]]. Or, you can generate an
+installation image from a local checkout of this repository, at a more recent
+commit, with the following command:
#+begin_src sh
guix system image --image-type=iso9660 /path/to/this/channel/nongnu/system/install.scm
@@ -173,18 +176,19 @@ is exactly equivalent to:
rest)))
#+END_SRC
-** Broadcom Wireless
+** Broadcom
+
+*** Wireless
Some Broadcom wireless hardware requires a proprietary kernel module in
addition to firmware. To use such hardware you will also need to add a service
-to load that module on boot, blacklist conflicting kernel modules, and while not
-required, it is recommended to stay with Linux LTS releases:
+to load that module on boot and blacklist conflicting kernel modules:
#+BEGIN_SRC scheme
(use-modules (nongnu packages linux))
(operating-system
- (kernel linux-lts)
+ (kernel linux)
;; Blacklist conflicting kernel modules.
(kernel-arguments '("modprobe.blacklist=b43,b43legacy,ssb,bcm43xx,brcm80211,brcmfmac,brcmsmac,bcma"))
(kernel-loadable-modules (list broadcom-sta))
@@ -193,6 +197,98 @@ required, it is recommended to stay with Linux LTS releases:
...)
#+END_SRC
+*** Webcam
+
+Like Broadcom wireless hardware, the Broadcom 1570 PCIe webcam (better known as
+FacetimeHD and found in recent Macbooks) also requires a kernel module,
+firmware, and blacklisting of conflicting modules:
+
+#+BEGIN_SRC scheme
+ (use-modules (nongnu packages linux))
+ (use-modules (nongnu packages firmware))
+
+ (operating-system
+ (kernel-arguments '("modprobe.blacklist=bdc_pci"))
+ (kernel-loadable-modules (list facetimehd))
+ (firmware (cons* facetimehd-firmware
+ facetimehd-calibration ; Optional but make the colors look better.
+ %base-firmware))
+ (services
+ (cons* (simple-service 'facetimehd
+ kernel-module-loader-service-type
+ '("facetimehd"))
+ ...))
+ ...)
+#+END_SRC
+
+** NVIDIA graphics card
+
+NVIDIA graphics card support in Nonguix consists of a system service =nvidia-service-type= and a package =nvda= for application setup.
+
+The following code serves as an example for system setup:
+
+#+BEGIN_SRC scheme
+ (use-modules (gnu services gnome)
+ (gnu services xorg)
+ (nongnu packages nvidia)
+ (nongnu services nvidia))
+
+ (operating-system
+ (kernel-arguments '("modprobe.blacklist=nouveau"
+ ;; Set this if the card is not used for displaying or
+ ;; you're using Wayland:
+ "nvidia_drm.modeset=1"))
+ (services
+ (cons* (service nvidia-service-type)
+ ;; Configure desktop environment, GNOME for example.
+ (service gnome-desktop-service-type
+ ;; Enable NVIDIA support, only do this when the card is
+ ;; used for displaying.
+ (gnome-desktop-configuration
+ (gnome (replace-mesa gnome))))
+ ;; Configure Xorg server, only do this when the card is used for
+ ;; displaying.
+ (set-xorg-configuration
+ (xorg-configuration
+ (modules (cons nvda %default-xorg-modules))
+ (drivers '("nvidia"))))
+ ...))
+ ...)
+#+END_SRC
+
+For application setup, =mesa= has to be replaced with =nvda= for every individual package that requires the NVIDIA driver, this can be done with grafting (which doesn't rebuild packages) or rewriting inputs (which rebuilds packages) (see [[https://guix.gnu.org/manual/devel/en/guix.html#Package-Transformation-Options][Package Transformation Options]] in GNU Guix Reference Manual). For example:
+
+#+BEGIN_SRC shell
+ guix build mesa-utils --with-graft=mesa=nvda
+ guix build mesa-utils --with-input=mesa=nvda
+#+END_SRC
+
+The above transformation can be used within an one-off software environment spawned by =guix shell= as well, for correct environment variables, the =nvda= package may be added into the environment:
+
+#+BEGIN_SRC shell
+ guix shell mesa-utils nvda --with-graft=mesa=nvda \
+ -- glxinfo
+#+END_SRC
+
+To graft mesa with nvda programmatically, use =replace-mesa= defined in =(nongnu packages nvidia)=:
+
+#+BEGIN_SRC scheme
+ (use-modules (nongnu packages nvidia))
+
+ ;; Replace mesa with nvda for a single package.
+ (replace-mesa <some-package>)
+
+ ;; Replace mesa with nvda for a package list.
+ (map replace-mesa (list <some-package> ...))
+
+ ;; A package with mesa replaced is still a package, it can be part of a
+ ;; package list.
+ (list (replace-mesa <some-package>)
+ ...)
+#+END_SRC
+
+When the card is not used for displaying, environment variables =__GLX_VENDOR_LIBRARY_NAME=nvidia= and =__NV_PRIME_RENDER_OFFLOAD=1= may be set.
+
** Substitutes for nonguix
A Nonguix substitute server is available at [[https://substitutes.nonguix.org]].