shell: inline utils.deploy

This commit is contained in:
tv 2017-09-21 21:08:34 +02:00
parent 43b891ef00
commit 79df063569

View File

@ -22,7 +22,12 @@ let
. ${init.env} . ${init.env}
. ${init.proxy opts} . ${init.proxy opts}
exec ${utils.deploy} # Use system's nixos-rebuild, which is not self-contained
export PATH=/run/current-system/sw/bin
exec ${utils.with-whatsupnix} \
nixos-rebuild switch \
--show-trace \
-I "$target_path"
''); '');
cmds.install = pkgs.withGetopt { cmds.install = pkgs.withGetopt {
@ -205,16 +210,6 @@ let
-I "$target_path" \ -I "$target_path" \
''; '';
utils.deploy = pkgs.writeDash "utils.deploy" ''
set -efu
# Use system's nixos-rebuild, which is not self-contained
export PATH=/run/current-system/sw/bin
${utils.with-whatsupnix} \
nixos-rebuild switch \
--show-trace \
-I "$target_path"
'';
utils.with-whatsupnix = pkgs.writeDash "utils.with-whatsupnix" '' utils.with-whatsupnix = pkgs.writeDash "utils.with-whatsupnix" ''
set -efu set -efu
if \test "$quiet" = true; then if \test "$quiet" = true; then