summaryrefslogtreecommitdiff
path: root/hosts/shared/pi/hardware-configuration.nix
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-11-06 08:03:32 -0800
committerFuwn <[email protected]>2024-11-06 08:03:32 -0800
commit00d3d26ee778013b1aa95a9f7fc645975fbb3169 (patch)
treec78eb1f5dc04399ef2b7c2a58ecc2e969f48688e /hosts/shared/pi/hardware-configuration.nix
parentlock: tsutsumi (diff)
downloadnixos-config-00d3d26ee778013b1aa95a9f7fc645975fbb3169.tar.xz
nixos-config-00d3d26ee778013b1aa95a9f7fc645975fbb3169.zip
hosts: add hoka host and joint configuration
Diffstat (limited to 'hosts/shared/pi/hardware-configuration.nix')
-rw-r--r--hosts/shared/pi/hardware-configuration.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/hosts/shared/pi/hardware-configuration.nix b/hosts/shared/pi/hardware-configuration.nix
new file mode 100644
index 0000000..88a8483
--- /dev/null
+++ b/hosts/shared/pi/hardware-configuration.nix
@@ -0,0 +1,43 @@
+{ lib, secrets, ... }:
+{
+ raspberry-pi-nix.board = "bcm2711";
+
+ networking = {
+ useDHCP = lib.mkDefault true;
+
+ wireless =
+ let
+ network = builtins.elemAt secrets.wifi 0;
+ in
+ {
+ enable = true;
+ interfaces = [ "wlan0" ];
+ networks."${network.ssid}".psk = network.psk;
+ };
+ };
+
+ hardware.raspberry-pi.config.all.dt-overlays =
+ (
+ overlays:
+ lib.attrsets.mapAttrs
+ (_name: _value: {
+ enable = true;
+ params = { };
+ })
+ (
+ lib.listToAttrs (
+ map (overlay: {
+ name = overlay;
+ value = { };
+ }) overlays
+ )
+ )
+ )
+ [
+ "disable-bt"
+ "dwc2"
+ "usb_power"
+ "ramlog"
+ "hdmi_blanking"
+ ];
+}