mirror of
https://github.com/nix-community/raspberry-pi-nix.git
synced 2025-11-08 19:46:03 +01:00
add example image to packages and CI
This commit is contained in:
parent
953aca9361
commit
0dfdbce026
2 changed files with 44 additions and 0 deletions
37
example/default.nix
Normal file
37
example/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
{ pkgs, lib, ... }: {
|
||||||
|
time.timeZone = "America/New_York";
|
||||||
|
users.users.root.initialPassword = "root";
|
||||||
|
networking = {
|
||||||
|
hostName = "example";
|
||||||
|
useDHCP = false;
|
||||||
|
interfaces = {
|
||||||
|
wlan0.useDHCP = true;
|
||||||
|
eth0.useDHCP = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
raspberry-pi-nix.board = "bcm2711";
|
||||||
|
hardware = {
|
||||||
|
raspberry-pi = {
|
||||||
|
config = {
|
||||||
|
all = {
|
||||||
|
base-dt-params = {
|
||||||
|
BOOT_UART = {
|
||||||
|
value = 1;
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
uart_2ndstage = {
|
||||||
|
value = 1;
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
dt-overlays = {
|
||||||
|
disable-bt = {
|
||||||
|
enable = true;
|
||||||
|
params = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -58,6 +58,12 @@
|
||||||
core-overlay = self.overlays.core;
|
core-overlay = self.overlays.core;
|
||||||
libcamera-overlay = self.overlays.libcamera;
|
libcamera-overlay = self.overlays.libcamera;
|
||||||
};
|
};
|
||||||
|
nixosConfigurations = {
|
||||||
|
rpi-example = srcs.nixpkgs.lib.nixosSystem {
|
||||||
|
system = "aarch64-linux";
|
||||||
|
modules = [ self.nixosModules.raspberry-pi ./example ];
|
||||||
|
};
|
||||||
|
};
|
||||||
checks.aarch64-linux = self.packages.aarch64-linux;
|
checks.aarch64-linux = self.packages.aarch64-linux;
|
||||||
packages.aarch64-linux = with pinned.lib;
|
packages.aarch64-linux = with pinned.lib;
|
||||||
let
|
let
|
||||||
|
|
@ -72,6 +78,7 @@
|
||||||
board-attr-set;
|
board-attr-set;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
example-sd-image = self.nixosConfigurations.rpi-example.config.system.build.sdImage;
|
||||||
firmware = pinned.raspberrypifw;
|
firmware = pinned.raspberrypifw;
|
||||||
wireless-firmware = pinned.raspberrypiWirelessFirmware;
|
wireless-firmware = pinned.raspberrypiWirelessFirmware;
|
||||||
uboot-rpi-arm64 = pinned.uboot-rpi-arm64;
|
uboot-rpi-arm64 = pinned.uboot-rpi-arm64;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue