mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-09-11 12:05:26 +03:00
Merge pull request #568 from samueldr-wip/feature/installer-boot-closure
examples/installer: Add boot closure to installer
This commit is contained in:
commit
0bc11b087a
@ -1,6 +1,7 @@
|
||||
{
|
||||
imports = [
|
||||
./adb.nix
|
||||
./boot-closure.nix
|
||||
./filesystems.nix
|
||||
./installer-gui.nix
|
||||
./installer-script.nix
|
||||
|
30
examples/installer/modules/boot-closure.nix
Normal file
30
examples/installer/modules/boot-closure.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib)
|
||||
mkIf
|
||||
optionalString
|
||||
;
|
||||
inherit (config.mobile)
|
||||
system
|
||||
;
|
||||
in
|
||||
{
|
||||
# Pins pre-built artifacts within the system closure that are going to be
|
||||
# used by the installer.
|
||||
system.extraSystemBuilderCmds = ''
|
||||
echo ":: Adding pre-built boot files to closure..."
|
||||
(
|
||||
PS4=" $ "; set -x
|
||||
mkdir -p $out/mobile-nixos-installer
|
||||
cd $out/mobile-nixos-installer
|
||||
ln -s ${config.mobile.boot.stage-1.kernel.package} kernel
|
||||
${optionalString (system.type == "depthcharge") ''
|
||||
ln -s ${config.mobile.outputs.depthcharge.kpart} kpart
|
||||
''}
|
||||
${optionalString (system.type == "u-boot") ''
|
||||
ln -s ${config.mobile.outputs.u-boot.boot-partition} boot-partition
|
||||
''}
|
||||
)
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user