summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2017-09-21 21:08:34 +0200
committertv <tv@krebsco.de>2017-09-21 21:08:34 +0200
commit85beb59f58f5efac85ad6c0fa3852258a2958fea (patch)
tree55bc199a571054a5cb36259f6da8302bddb096d7
parent3ad10df13bef8af9d8680f1686799a54cf55b172 (diff)
shell: inline utils.deploy
-rw-r--r--shell.nix17
1 files changed, 6 insertions, 11 deletions
diff --git a/shell.nix b/shell.nix
index 4b8abed..c9b197a 100644
--- a/shell.nix
+++ b/shell.nix
@@ -22,7 +22,12 @@ let
. ${init.env}
. ${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 {
@@ -205,16 +210,6 @@ let
-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" ''
set -efu
if \test "$quiet" = true; then