diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2018-12-18 23:18:40 +0100 |
|---|---|---|
| committer | Daiderd Jordan <daiderd@gmail.com> | 2018-12-18 23:21:21 +0100 |
| commit | 5f7c0b6f56b4e68de9633d5a552464672f78b70a (patch) | |
| tree | 5b23c757bf5158dad7e3d688ea642d829008ec59 | |
| parent | bd1ad9fd603ea89a964e479fb4b2d2c86c254e60 (diff) | |
lnl: fix reexec aliases
| -rw-r--r-- | modules/examples/lnl.nix | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/modules/examples/lnl.nix b/modules/examples/lnl.nix index b9f49e7..c9faa2d 100644 --- a/modules/examples/lnl.nix +++ b/modules/examples/lnl.nix @@ -193,6 +193,16 @@ curl -F 'f:1=<-' ix.io } + mount_ram() { + local dev + if [ -e /Volumes/RAM ]; then + dev=$(diskutil info | awk '/Device Node:/ {print $3}') + umount /Volumes/RAM + hdiutil detach "$dev" + fi + diskutil erasevolume JHFS+ RAM $(hdiutil attach -nomount ram://10248576) + } + install_name_tool() { ${pkgs.darwin.cctools}/bin/install_name_tool "$@" } @@ -282,17 +292,19 @@ } reexec() { - unset __ETC_ZSHRC_SOURCED - unset __ETC_ZSHENV_SOURCED + unset __NIX_DARWIN_SET_ENVIRONMENT_DONE unset __ETC_ZPROFILE_SOURCED + unset __ETC_ZSHENV_SOURCED + unset __ETC_ZSHRC_SOURCED exec $SHELL -c 'echo >&2 "reexecuting shell: $SHELL" && exec $SHELL -l' } reexec-tmux() { local host - unset __ETC_ZSHRC_SOURCED - unset __ETC_ZSHENV_SOURCED + unset __NIX_DARWIN_SET_ENVIRONMENT_DONE unset __ETC_ZPROFILE_SOURCED + unset __ETC_ZSHENV_SOURCED + unset __ETC_ZSHRC_SOURCED host=$(hostname -s | awk -F'-' '{print tolower($NF)}') exec tmux new-session -A -s "$host" "$@" } |
