milkv/pioneer: init

This commit is contained in:
Steven Keuchel
2024-03-31 01:45:46 +01:00
committed by RaitoBezarius
parent cac934beb3
commit f4a07223a3
13 changed files with 402 additions and 0 deletions

50
milkv/pioneer/README.md Normal file
View File

@@ -0,0 +1,50 @@
# Creating an installation SD card image
Create and customize a `flake.nix` file:
```nix
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:nixos/nixos-hardware";
};
outputs = { nixpkgs, nixos-hardware, ... }:
let
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"riscv64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSupportedSystems = nixpkgs.lib.genAttrs supportedSystems;
in
{
packages = forAllSupportedSystems (system: rec {
default = sd-image;
sd-image = (import "${nixpkgs}/nixos" {
configuration = {
imports = [
"${nixos-hardware}/milkv/pioneer/sd-image-installer.nix"
];
nixpkgs.buildPlatform.system = system;
nixpkgs.hostPlatform.system = "riscv64-linux";
system.stateVersion = "24.05";
};
inherit system;
}).config.system.build.sdImage;
});
};
}
```
Then build the image by running `nix build .#` in the same folder.
# Known issues
LinuxBoot will not output the boot menu on the serial console, only on the graphical console.
Unfortuately, it might also pick up boot options from other devices, e.g. an nvme or sata drive.
It might end up booting by default from those instead of booting from the SD card.