{ custom, hostname, ip }: { lib, pkgs, ... }: { imports = [ custom.inputs.nixos-hardware.nixosModules.raspberry-pi-4 "${custom.inputs.self}/modules/log-to-ram" "${custom.inputs.self}/modules/syslog" ]; boot = { supportedFilesystems = lib.mkForce [ "f2fs" "ntfs" "cifs" "ext4" "vfat" "nfs" "nfs4" ]; }; fileSystems = { "/" = { device = "/dev/disk/by-label/NIXOS_SD"; fsType = "ext4"; options = [ "noatime" ]; }; }; hardware.raspberry-pi."4".fkms-3d.enable = true; hardware.raspberry-pi."4".audio.enable = true; hardware.pulseaudio.enable = true; environment.systemPackages = with pkgs; [ libraspberrypi raspberrypi-eeprom ]; networking = { useDHCP = false; hostName = hostname; hosts = { "127.0.0.1" = [ "${hostname}.2li.local" ]; ip = [ "${hostname}.2li.local" ]; }; defaultGateway = "10.7.89.1"; nameservers = [ "10.7.89.2" ]; interfaces.eth0.ipv4.addresses = [ { address = ip; prefixLength = 24; } ]; }; environment.shellAliases = { raspi-cpu = '' sudo vcgencmd get_throttled && sudo vcgencmd measure_temp ''; raspi-firmware-update = '' sudo mkdir -p /mnt && \ sudo mount /dev/disk/by-label/FIRMWARE /mnt && \ BOOTFS=/mnt FIRMWARE_RELEASE_STATUS=stable sudo -E rpi-eeprom-update -d -a && \ sudo umount /mnt ''; }; }