File tree Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -43,17 +43,21 @@ while [[ $# -gt 0 ]]; do
4343 --builder)
4444 nixBuildArgs+=(" --build-host" )
4545 nixBuildArgs+=(" $2 " )
46- shift
47- shift
46+ shift 2
4847 ;;
4948 --build-args)
5049 shift
5150 globalBuildArgs=(" $@ " )
5251 break
5352 ;;
5453 --first-install)
55- shift
5654 isFirstInstall=1
55+ shift
56+ ;;
57+ --logs)
58+ export ICEDOS_LOGGING=1
59+ trace=" --show-trace"
60+ shift
5761 ;;
5862 -* |--* )
5963 echo " Unknown arg: $1 " >&2
@@ -86,11 +90,11 @@ export ICEDOS_FLAKE_INPUTS=$(mktemp)
8690
8791[ " $update_repos " == " 1" ] && refresh=" --refresh"
8892
89- ICEDOS_UPDATE=" $update_repos " ICEDOS_STAGE=" genflake" nix eval $refresh --show- trace --file " ./lib/genflake.nix" flakeInputs | nixfmt | sed " 1,1d" | sed " \$ d" > $ICEDOS_FLAKE_INPUTS
93+ ICEDOS_UPDATE=" $update_repos " ICEDOS_STAGE=" genflake" nix eval $refresh $ trace --file " ./lib/genflake.nix" flakeInputs | nixfmt | sed " 1,1d" | sed " \$ d" > $ICEDOS_FLAKE_INPUTS
9094(printf " { inputs = {" ; cat $ICEDOS_FLAKE_INPUTS ; printf " }; outputs = { ... }: {}; }" ) > $FLAKE
9195nix flake prefetch-inputs
9296
93- ICEDOS_STAGE=" genflake" nix eval --show- trace --file " ./lib/genflake.nix" --raw flakeFinal > $FLAKE
97+ ICEDOS_STAGE=" genflake" nix eval $ trace --file " ./lib/genflake.nix" --raw flakeFinal > $FLAKE
9498nixfmt " $FLAKE "
9599
96100rm $ICEDOS_FLAKE_INPUTS
@@ -119,8 +123,8 @@ echo "Building from path $TMP_BUILD_FOLDER"
119123
120124# Build the system configuration
121125if (( ${# nixBuildArgs[@]} != 0 )) || [[ " $isFirstInstall " == 1 ]]; then
122- sudo nixos-rebuild $action --flake .# "$(cat /etc/hostname)" ${nixBuildArgs[*]} ${globalBuildArgs[*]}
126+ sudo nixos-rebuild $action --flake .# "$(cat /etc/hostname)" $trace $ {nixBuildArgs[*]} ${globalBuildArgs[*]}
123127 exit 0
124128fi
125129
126- nh os $action " $TMP_BUILD_FOLDER " ${nhBuildArgs[*]} -- ${globalBuildArgs[*]}
130+ nh os $action " $TMP_BUILD_FOLDER " ${nhBuildArgs[*]} -- $trace $ {globalBuildArgs[*]}
Original file line number Diff line number Diff line change 1- _ : {
1+ _ :
2+ let
3+ inherit ( builtins ) getEnv ;
4+ in
5+ {
26 INPUTS_PREFIX = "icedos" ;
3- ENABLE_LOGGING = false ;
7+ ENABLE_LOGGING = if ( ( getEnv "ICEDOS_LOGGING" ) == "1" ) then true else false ;
48
59 ICEDOS_STAGE =
610 let
7- stage = builtins . getEnv "ICEDOS_STAGE" ;
11+ stage = getEnv "ICEDOS_STAGE" ;
812 in
913 if stage != "" then stage else "nixos_build" ;
1014}
You can’t perform that action at this time.
0 commit comments