mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-27 05:19:43 +01:00
Merge pull request #495 from Madouura/pr/visionfive
starfive/visionfive/v1: Make sd-image more flake-friendly
This commit is contained in:
commit
6b35a59c19
3 changed files with 14 additions and 12 deletions
|
@ -1,4 +1,4 @@
|
||||||
### Build the SD image
|
## Build the SD image
|
||||||
- ``nix-build "<nixpkgs/nixos>" -A config.system.build.sdImage -I nixos-config=iso.nix``
|
- ``nix-build "<nixpkgs/nixos>" -A config.system.build.sdImage -I nixos-config=iso.nix``
|
||||||
|
|
||||||
- ``iso.nix``
|
- ``iso.nix``
|
||||||
|
@ -16,10 +16,10 @@
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Relevant documentation
|
## Relevant documentation
|
||||||
- Flashing
|
- Flashing
|
||||||
- - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/hardware_connection.html
|
- https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/hardware_connection.html
|
||||||
- - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/using_xmodem1.html
|
- https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/using_xmodem1.html
|
||||||
- Recovery
|
- Recovery
|
||||||
- - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/hardware_setup.html
|
- https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/hardware_setup.html
|
||||||
- - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/for_maclinux4.html
|
- https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/for_maclinux4.html
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
# To build, use:
|
# To build, use:
|
||||||
# nix-build "<nixpkgs/nixos>" -I nixos-config=starfive/visionfive/v1/sd-image-installer.nix -A config.system.build.sdImage
|
# nix-build "<nixpkgs/nixos>" -I nixos-config=starfive/visionfive/v1/sd-image-installer.nix -A config.system.build.sdImage
|
||||||
|
{ modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
<nixpkgs/nixos/modules/profiles/installation-device.nix>
|
"${modulesPath}/profiles/installation-device.nix"
|
||||||
./sd-image.nix
|
./sd-image.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# the installation media is also the installation target,
|
# The installation media is also the installation target,
|
||||||
# so we don't want to provide the installation configuration.nix.
|
# so we don't want to provide the installation configuration.nix.
|
||||||
installer.cloneConfig = false;
|
installer.cloneConfig = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
# To build, use:
|
# To build, use:
|
||||||
# nix-build "<nixpkgs}/nixos>" -I nixos-config=starfive/visionfive/v1/sd-image.nix -A config.system.build.sdImage
|
# nix-build "<nixpkgs/nixos>" -I nixos-config=starfive/visionfive/v1/sd-image.nix -A config.system.build.sdImage
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
firmware = pkgs.callPackage ./firmware.nix { };
|
firmware = pkgs.callPackage ./firmware.nix { };
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
<nixpkgs/nixos/modules/profiles/base.nix>
|
"${modulesPath}/profiles/base.nix"
|
||||||
<nixpkgs/nixos/modules/installer/sd-card/sd-image.nix>
|
"${modulesPath}/installer/sd-card/sd-image.nix"
|
||||||
./default.nix
|
./default.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue