75 lines
1.4 KiB
Nix
75 lines
1.4 KiB
Nix
|
{ config, lib, pkgs, modulesPath, ... }:
|
||
|
|
||
|
with lib; {
|
||
|
system.stateVersion = "22.05";
|
||
|
|
||
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||
|
|
||
|
boot = {
|
||
|
initrd = {
|
||
|
availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ];
|
||
|
kernelModules = [ ];
|
||
|
};
|
||
|
loader = {
|
||
|
grub.enable = false;
|
||
|
# generic-extlinux-compatible.enable = true;
|
||
|
raspberryPi = {
|
||
|
enable = true;
|
||
|
version = 4;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
tmpOnTmpfs = true;
|
||
|
|
||
|
kernelModules = [ ];
|
||
|
kernelPackages = pkgs.linuxPackages_rpi4;
|
||
|
kernelParams = [
|
||
|
"8250.nr_uarts=1"
|
||
|
"console=ttyAMA0,115200"
|
||
|
"console=tty1"
|
||
|
];
|
||
|
|
||
|
extraModulePackages = [ ];
|
||
|
};
|
||
|
|
||
|
hardware = {
|
||
|
enableRedistributableFirmware = true;
|
||
|
# raspberry-pi."4".fkms-3d.enable = true;
|
||
|
};
|
||
|
|
||
|
fileSystems = {
|
||
|
"/" = {
|
||
|
device = "/dev/disk/by-label/NIXOS_SD";
|
||
|
fsType = "ext4";
|
||
|
options = [ "noatime" ];
|
||
|
};
|
||
|
|
||
|
"/boot" = {
|
||
|
device = "/dev/disk/by-label/FIRMWARE";
|
||
|
fsType = "vfat";
|
||
|
options = [ "noatime" ];
|
||
|
};
|
||
|
};
|
||
|
|
||
|
swapDevices = [ ];
|
||
|
|
||
|
networking = {
|
||
|
useDHCP = mkDefault false;
|
||
|
|
||
|
macvlans = {
|
||
|
intif0 = {
|
||
|
interface = "eth0";
|
||
|
mode = "bridge";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
interfaces = {
|
||
|
eth0.useDHCP = false;
|
||
|
intif0.macAddress = "02:fa:d4:07:cf:f4";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||
|
|
||
|
}
|