From 3375c37c2cda13074ede1f5ed12bcb651d0ffc5a Mon Sep 17 00:00:00 2001 From: Travis Staton Date: Fri, 26 Jul 2024 08:50:52 -0400 Subject: [PATCH] restrict board options --- overlays/default.nix | 2 +- rpi/default.nix | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/overlays/default.nix b/overlays/default.nix index c5cb91f..5de4638 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -43,7 +43,7 @@ let ]; }; }; - boards = [ "bcmrpi" "bcm2709" "bcmrpi3" "bcm2711" "bcm2712" ]; + boards = [ "bcm2711" "bcm2712" ]; # Helpers for building the `pkgs.rpi-kernels' map. rpi-kernel = { version, board }: diff --git a/rpi/default.nix b/rpi/default.nix index 2c05609..6332846 100644 --- a/rpi/default.nix +++ b/rpi/default.nix @@ -18,7 +18,7 @@ in description = "Kernel version to build."; }; board = mkOption { - type = types.str; + type = types.enum [ "bcm2711" "bcm2712" ]; description = '' The kernel board version to build. Examples at: https://www.raspberrypi.com/documentation/computers/linux_kernel.html#native-build-configuration @@ -333,8 +333,8 @@ in }; hardware.enableRedistributableFirmware = true; - users.groups = builtins.listToAttrs (map (k: { name = k; value = {}; }) - ["input" "sudo" "plugdev" "games" "netdev" "gpio" "i2c" "spi"]); + users.groups = builtins.listToAttrs (map (k: { name = k; value = { }; }) + [ "input" "sudo" "plugdev" "games" "netdev" "gpio" "i2c" "spi" ]); services = { udev.extraRules = let shell = "${pkgs.bash}/bin/bash";