62 lines
2 KiB
Nix
62 lines
2 KiB
Nix
{ inputs, lib, pkgs, modulesPath, ... }: {
|
|
imports = [
|
|
inputs.nixos-hardware.nixosModules.raspberry-pi-4
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
|
../../common/services/tailscale-autoconnect.nix
|
|
];
|
|
# Enable distributed Builds
|
|
nix.distributedBuilds = true;
|
|
|
|
console.enable = true;
|
|
environment.systemPackages = with pkgs; [
|
|
libraspberrypi
|
|
raspberrypi-eeprom
|
|
];
|
|
|
|
# Set your time zone.
|
|
time.timeZone = "America/Chicago";
|
|
|
|
#####################################################################################
|
|
# BEGIN hardware config
|
|
#####################################################################################
|
|
boot = {
|
|
initrd.availableKernelModules = [
|
|
"xhci_pci"
|
|
"usbhid"
|
|
"usb_storage"
|
|
"vc4"
|
|
"pcie_brcmstb" # required for the pcie bus to work
|
|
"reset-raspberrypi" # required for vl805 firmware to load
|
|
];
|
|
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
|
|
loader.grub.enable = false;
|
|
# Enables the generation of /boot/extlinux/extlinux.conf
|
|
loader.generic-extlinux-compatible.enable = true;
|
|
|
|
initrd.kernelModules = [ ];
|
|
kernelModules = [ ];
|
|
extraModulePackages = [ ];
|
|
};
|
|
|
|
fileSystems."/" = {
|
|
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
|
|
fsType = "ext4";
|
|
};
|
|
|
|
hardware.enableRedistributableFirmware = true;
|
|
|
|
swapDevices = [ ];
|
|
networking.useDHCP = lib.mkDefault true;
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
|
networking.hostName = "quitman-rpi4";
|
|
#####################################################################################
|
|
# END hardware config
|
|
#####################################################################################
|
|
|
|
services.tailscale.extraUpFlags = [
|
|
"--advertise-exit-node"
|
|
"--advertise-routes=192.168.68.0/22"
|
|
];
|
|
boot.kernel.sysctl = { "net.ipv4.ip_forward" = true; };
|
|
networking.firewall.allowedTCPPorts = [ 22 ];
|
|
}
|