File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change 6
6
7
7
* -f, --flake flake
8
8
set the flake to install the system from
9
+ * -L, --print-build-logs
10
+ print full build logs
9
11
* -s, --store-paths
10
12
set the store paths to the disko-script and nixos-system directly
11
13
if this is give, flake is not needed
@@ -44,6 +46,9 @@ while [[ $# -gt 0 ]]; do
44
46
flake=$2
45
47
shift
46
48
;;
49
+ -L | --print-build-logs)
50
+ print_build_logs=y
51
+ ;;
47
52
-s | --store-paths)
48
53
disko_script=$( readlink -f " $2 " )
49
54
nixos_system=$( readlink -f " $3 " )
@@ -63,6 +68,7 @@ while [[ $# -gt 0 ]]; do
63
68
;;
64
69
--debug)
65
70
enable_debug=" -x"
71
+ print_build_logs=y
66
72
set -x
67
73
;;
68
74
--extra-files)
@@ -100,15 +106,24 @@ timeout_ssh_() {
100
106
ssh_ () {
101
107
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no " $ssh_connection " " $@ "
102
108
}
109
+
110
+ nix_options=(
111
+ --extra-experimental-features ' nix-command flakes'
112
+ " --no-write-lock-file"
113
+ )
114
+
115
+ if [[ ${print_build_logs-n} == " y" ]]; then
116
+ nix_options+=(" -L" )
117
+ fi
118
+
103
119
nix_copy () {
104
120
NIX_SSHOPTS=' -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' nix copy \
105
- --extra-experimental-features ' nix-command flakes ' \
121
+ " ${nix_options[@]} " \
106
122
" $@ "
107
123
}
108
124
nix_build () {
109
125
nix build \
110
- --extra-experimental-features ' nix-command flakes' \
111
- --no-write-lock-file \
126
+ " ${nix_options[@]} " \
112
127
--print-out-paths \
113
128
--no-link \
114
129
" $@ "
You can’t perform that action at this time.
0 commit comments