summaryrefslogtreecommitdiffstats
path: root/pkgs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2022-09-07 11:55:35 +0200
committertv <tv@krebsco.de>2022-09-07 11:55:35 +0200
commite5c13343a691361934b68ed4019bc42787b62606 (patch)
tree0abe8e1c51255883125dd81b00adc2deb590bd80 /pkgs
parent6ee1d00b924e6187c7ee0f70b5a7d62be43b5853 (diff)
withNixOutputMonitor: run shell with know Nix path
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/krops/default.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/krops/default.nix b/pkgs/krops/default.nix
index b94c89b..a0244c3 100644
--- a/pkgs/krops/default.nix
+++ b/pkgs/krops/default.nix
@@ -9,7 +9,7 @@ in
}:
args: target:
runShell target {}
- (withNixOutputMonitor useNixOutputMonitor /* sh */ ''
+ (withNixOutputMonitor target useNixOutputMonitor /* sh */ ''
nixos-rebuild -I ${
lib.concatMapStringsSep " " lib.escapeShellArg ([target.path] ++ args)
}
@@ -37,7 +37,7 @@ in
])}
'';
- withNixOutputMonitor = mode_: command: let
+ withNixOutputMonitor = target: mode_: command: let
mode =
lib.getAttr (lib.typeOf mode_) {
bool = lib.toJSON mode_;
@@ -57,6 +57,7 @@ in
(${command}) 2>&1 | nom
'';
pessimistic = /* sh */ ''
+ NIX_PATH=${lib.escapeShellArg target.path} \
nix-shell -p nix-output-monitor --run ${lib.escapeShellArg optimistic}
'';
true = /* sh */ ''