mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
activate-user script: fix broken NIX_PATH if paths contain spaces
This commit is contained in:
parent
6c71c49e24
commit
9077d812d8
1 changed files with 4 additions and 1 deletions
|
@ -3,6 +3,9 @@
|
|||
with lib;
|
||||
|
||||
let
|
||||
# Similar to lib.escapeShellArg but escapes "s instead of 's, to allow for parameter expansion in shells
|
||||
escapeDoubleQuote = arg: ''"${replaceStrings ["\""] ["\"\\\"\""] (toString arg)}"'';
|
||||
|
||||
cfg = config.system.checks;
|
||||
|
||||
darwinChanges = ''
|
||||
|
@ -180,7 +183,7 @@ let
|
|||
'';
|
||||
|
||||
nixPath = ''
|
||||
nixPath=${concatStringsSep ":" config.nix.nixPath}:$HOME/.nix-defexpr/channels
|
||||
nixPath=${concatMapStringsSep ":" escapeDoubleQuote config.nix.nixPath}:$HOME/.nix-defexpr/channels
|
||||
|
||||
darwinConfig=$(NIX_PATH=$nixPath nix-instantiate --find-file darwin-config) || true
|
||||
if ! test -e "$darwinConfig"; then
|
||||
|
|
Loading…
Reference in a new issue