Commit 851d511b5d48
Changed files (2)
systems
nagoya
systems/nagoya/config.txt.nix
@@ -0,0 +1,56 @@
+{
+ config,
+ pkgs,
+ lib,
+ ...
+}:
+
+{
+ hardware.raspberry-pi.config = {
+ all = {
+ # [all] conditional filter, https://www.raspberrypi.com/documentation/computers/config_txt.html#conditional-filters
+
+ options = {
+ camera_auto_detect.enable = false;
+
+ # https://www.raspberrypi.com/documentation/computers/config_txt.html#enable_uart
+ # in conjunction with `console=serial0,115200` in kernel command line (`cmdline.txt`)
+ # creates a serial console, accessible using GPIOs 14 and 15 (pins
+ # 8 and 10 on the 40-pin header)
+ enable_uart = {
+ enable = true;
+ value = true;
+ };
+ # https://www.raspberrypi.com/documentation/computers/config_txt.html#uart_2ndstage
+ # enable debug logging to the UART, also automatically enables
+ # UART logging in `start.elf`
+ uart_2ndstage = {
+ enable = true;
+ value = true;
+ };
+ };
+
+ # Base DTB parameters
+ # https://github.com/raspberrypi/linux/blob/a1d3defcca200077e1e382fe049ca613d16efd2b/arch/arm/boot/dts/overlays/README#L132
+ base-dt-params = {
+
+ # https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#enable-pcie
+ pciex1 = {
+ enable = true;
+ value = "on";
+ };
+ # PCIe Gen 3.0
+ # https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#pcie-gen-3-0
+ pciex1_gen = {
+ enable = true;
+ value = "3";
+ };
+
+ };
+ dt-overlays = {
+ # needs to be false otherwise it hangs at boot time
+ vc-kms-v3d = lib.mkForce false;
+ };
+ };
+ };
+}
systems/nagoya/hardware.nix
@@ -49,6 +49,7 @@ in
{
imports = [
inputs.disko.nixosModules.disko
+ ./config.txt.nix
];
disko.devices = {
disk.nvme0 = {
@@ -69,14 +70,17 @@ in
};
root = {
- type = "filesystem";
- format = "ext4";
- mountpoint = "/";
- mountOptions = [
- "noatime"
- "nodiratime"
- "discard"
- ];
+ size = "100%";
+ content = {
+ type = "filesystem";
+ format = "ext4";
+ mountpoint = "/";
+ mountOptions = [
+ "noatime"
+ "nodiratime"
+ "discard"
+ ];
+ };
};
};