1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-26 21:09:42 +01:00

Raspberry Pi 3: init

This commit is contained in:
pinage404 2024-06-25 01:07:34 +02:00 committed by mergify[bot]
parent 231274268f
commit d11eeae766
3 changed files with 40 additions and 0 deletions

View file

@ -302,6 +302,7 @@ See code for all available configurations.
| [Purism Librem 15v3](purism/librem/13v3) | `<nixos-hardware/purism/librem/15v3>` | | [Purism Librem 15v3](purism/librem/13v3) | `<nixos-hardware/purism/librem/15v3>` |
| [Purism Librem 5r4](purism/librem/5r4) | `<nixos-hardware/purism/librem/5r4>` | | [Purism Librem 5r4](purism/librem/5r4) | `<nixos-hardware/purism/librem/5r4>` |
| [Raspberry Pi 2](raspberry-pi/2) | `<nixos-hardware/raspberry-pi/2>` | | [Raspberry Pi 2](raspberry-pi/2) | `<nixos-hardware/raspberry-pi/2>` |
| [Raspberry Pi 3](raspberry-pi/3) | `<nixos-hardware/raspberry-pi/3>` |
| [Raspberry Pi 4](raspberry-pi/4) | `<nixos-hardware/raspberry-pi/4>` | | [Raspberry Pi 4](raspberry-pi/4) | `<nixos-hardware/raspberry-pi/4>` |
| [Raspberry Pi 5](raspberry-pi/5) | `<nixos-hardware/raspberry-pi/5>` | | [Raspberry Pi 5](raspberry-pi/5) | `<nixos-hardware/raspberry-pi/5>` |
| [Samsung Series 9 NP900X3C](samsung/np900x3c) | `<nixos-hardware/samsung/np900x3c>` | | [Samsung Series 9 NP900X3C](samsung/np900x3c) | `<nixos-hardware/samsung/np900x3c>` |

View file

@ -239,6 +239,7 @@
purism-librem-15v3 = import ./purism/librem/15v3; purism-librem-15v3 = import ./purism/librem/15v3;
purism-librem-5r4 = import ./purism/librem/5r4; purism-librem-5r4 = import ./purism/librem/5r4;
raspberry-pi-2 = import ./raspberry-pi/2; raspberry-pi-2 = import ./raspberry-pi/2;
raspberry-pi-3 = import ./raspberry-pi/3;
raspberry-pi-4 = import ./raspberry-pi/4; raspberry-pi-4 = import ./raspberry-pi/4;
raspberry-pi-5 = import ./raspberry-pi/5; raspberry-pi-5 = import ./raspberry-pi/5;
kobol-helios4 = import ./kobol/helios4; kobol-helios4 = import ./kobol/helios4;

View file

@ -0,0 +1,38 @@
{ lib
, pkgs
, ...
}:
{
boot.kernelPackages = lib.mkDefault pkgs.linuxKernel.packages.linux_rpi3;
# fix the following error :
# modprobe: FATAL: Module ahci not found in directory
# https://github.com/NixOS/nixpkgs/issues/154163#issuecomment-1350599022
nixpkgs.overlays = [
(_final: super: {
makeModulesClosure = x:
super.makeModulesClosure (x // { allowMissing = true; });
})
];
# https://github.com/NixOS/nixpkgs/blob/b72bde7c4a1f9c9bf1a161f0c267186ce3c6483c/nixos/modules/installer/sd-card/sd-image-aarch64.nix#L12
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
boot.loader.grub.enable = lib.mkDefault false;
# Enables the generation of /boot/extlinux/extlinux.conf
boot.loader.generic-extlinux-compatible.enable = lib.mkDefault true;
# The serial ports listed here are:
# - ttyS0: for Tegra (Jetson TX1)
# - ttyAMA0: for QEMU's -machine virt
# https://github.com/NixOS/nixpkgs/blob/b72bde7c4a1f9c9bf1a161f0c267186ce3c6483c/nixos/modules/installer/sd-card/sd-image-aarch64.nix#L19
boot.kernelParams = [
"console=ttyS0,115200n8"
"console=ttyAMA0,115200n8"
"console=tty0"
];
environment.systemPackages = with pkgs; [
libraspberrypi
];
}