feat: add Raspberry Pi configuraation

This commit is contained in:
Infinidoge 2021-10-14 10:43:26 -04:00
parent 68c94811ff
commit 25db8bedfa
2 changed files with 45 additions and 0 deletions

View file

@ -0,0 +1,13 @@
{ suites, profiles, pkgs, lib, ... }: {
imports = lib.lists.flatten [
(with suites; [
base
])
(with profiles; [
hardware.rpi
networking.wireless
])
];
}

32
profiles/hardware/rpi.nix Normal file
View file

@ -0,0 +1,32 @@
{ config, pkgs, lib, inputs, ... }: {
imports = [ inputs.nixos-hardware.outputs.nixosModules.raspberry-pi-4 ];
boot = {
tmpOnTmpfs = true;
kernelParams = [
"8250.nr_uarts=1"
"console=ttyAMA0,115200"
"console=tty1"
];
loader = {
raspberryPi = {
enable = true;
version = 4;
};
grub.enable = false;
generic-extlinux-compatible.enable = true;
};
};
hardware.raspberry-pi."4" = {
fkms-3d.enable = true;
};
powerManagement.cpuFreqGovernor = "ondemand";
environment.systemPackages = with pkgs; [
raspberrypi-eeprom
];
}