mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-23 03:19:42 +01:00
add raspberry-pi 0 and 3
Based off of 2.
This commit is contained in:
parent
a9033dcc5f
commit
9160873c16
2 changed files with 62 additions and 0 deletions
32
raspberry-pi/0/default.nix
Normal file
32
raspberry-pi/0/default.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ lib, pkgs, ...}:
|
||||
|
||||
{
|
||||
boot = {
|
||||
consoleLogLevel = lib.mkDefault 7;
|
||||
extraTTYs = [ "ttyAMA0" ];
|
||||
kernelPackages = lib.mkDefault pkgs.linuxPackages_rpi;
|
||||
kernelParams = [
|
||||
"dwc_otg.lpm_enable=0"
|
||||
"console=ttyAMA0,115200"
|
||||
"rootwait"
|
||||
"elevator=deadline"
|
||||
];
|
||||
loader = {
|
||||
grub.enable = lib.mkDefault false;
|
||||
generationsDir.enable = lib.mkDefault false;
|
||||
raspberryPi = {
|
||||
enable = lib.mkDefault true;
|
||||
version = lib.mkDefault 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nix.buildCores = 1;
|
||||
|
||||
nixpkgs.config.platform = lib.systems.platforms.raspberrypi;
|
||||
|
||||
# cpufrequtils doesn't build on ARM
|
||||
powerManagement.enable = lib.mkDefault false;
|
||||
|
||||
services.openssh.enable = lib.mkDefault true;
|
||||
}
|
30
raspberry-pi/3/default.nix
Normal file
30
raspberry-pi/3/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ lib, pkgs, ...}:
|
||||
|
||||
{
|
||||
boot = {
|
||||
consoleLogLevel = lib.mkDefault 7;
|
||||
extraTTYs = [ "ttyAMA0" ];
|
||||
kernelPackages = lib.mkDefault pkgs.linuxPackages_rpi;
|
||||
kernelParams = [
|
||||
"dwc_otg.lpm_enable=0"
|
||||
"console=ttyAMA0,115200"
|
||||
"rootwait"
|
||||
"elevator=deadline"
|
||||
"cma=32M"
|
||||
];
|
||||
loader = {
|
||||
grub.enable = lib.mkDefault false;
|
||||
generationsDir.enable = lib.mkDefault false;
|
||||
raspberryPi = {
|
||||
enable = lib.mkDefault true;
|
||||
version = lib.mkDefault 3;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nix.buildCores = 4;
|
||||
|
||||
nixpkgs.config.platform = lib.systems.platforms.aarch64-multiplatform;
|
||||
|
||||
services.openssh.enable = lib.mkDefault true;
|
||||
}
|
Loading…
Reference in a new issue