File tree Expand file tree Collapse file tree 3 files changed +17
-20
lines changed
Expand file tree Collapse file tree 3 files changed +17
-20
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,7 @@ Set `BOARD_TYPE` to the desired value and run the command as shown below.
1010$ export BOARD_TYPE=foobar
1111# nixpkgs pinned to master as of Thu Mar 31 08:01:29 2022 -0700
1212$ export NIXPKGS=" https://github.com/NixOS/nixpkgs/archive/3e481ad.tar.gz"
13- $ nix-build ' <nixpkgs/nixos>' \
14- -A config.system.build.sdImage \
15- -I nixpkgs=$NIXPKGS \
16- -I nixos-config=./sd-image.nix \
17- -I machine=machines/$BOARD_TYPE \
18- --out-link out-links/$BOARD_TYPE
13+ $ nix-build -I nixpkgs=$NIXPKGS -I machine=machines/$BOARD_TYPE --out-link out-links/$BOARD_TYPE
1914```
2015### Boards
2116` BOARD_TYPE ` can be set to the name of any directory in ` machines ` .
@@ -35,12 +30,7 @@ $ export NIXPKGS=https://github.com/NixOS/nixpkgs/archive/3e481ad.tar.gz
3530$ for machine in $( find machines -maxdepth 1 -mindepth 1 -type d)
3631do
3732 export BOARD_TYPE=$( basename $machine ) ;
38- nix-build ' <nixpkgs/nixos>' \
39- -A config.system.build.sdImage \
40- -I nixpkgs=$NIXPKGS \
41- -I nixos-config=./sd-image.nix \
42- -I machine=machines/$BOARD_TYPE \
43- --out-link out-links/$BOARD_TYPE
33+ nix-build -I nixpkgs=$NIXPKGS -I machine=machines/$BOARD_TYPE --out-link out-links/$BOARD_TYPE
4434done
4535```
4636
Original file line number Diff line number Diff line change 1+ let
2+ lib = import <nixpkgs/lib> ;
3+ nixos = import <nixpkgs/nixos> {
4+ configuration = { ... } : {
5+ imports = [
6+ <machine/sd-image.nix>
7+ <machine/hardware-configuration.nix>
8+ ./nixos/configuration.nix
9+ ] ++ lib . optionals ( builtins . pathExists ./custom.nix ) [ ./custom.nix ] ;
10+ } ;
11+ } ;
12+ in
13+ nixos . config . system . build . sdImage // {
14+ inherit ( nixos ) pkgs system config ;
15+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments