mirror of
https://cgit.krebsco.de/krops
synced 2024-11-10 13:19:46 +01:00
withNixOutputMonitor: run shell with know Nix path
This commit is contained in:
parent
6ee1d00b92
commit
e5c13343a6
1 changed files with 3 additions and 2 deletions
|
@ -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 */ ''
|
||||
|
|
Loading…
Reference in a new issue