From 8fee07a805636721b635a3ee1a3db0488240e095 Mon Sep 17 00:00:00 2001 From: Chad Nelson Date: Sat, 16 Sep 2023 15:59:42 -0600 Subject: [PATCH] Updated readme --- README.org | 92 ++++++++++++++++++++++++++++++++++++++ README.md => README_old.md | 0 README_old.md.tmp | 45 +++++++++++++++++++ 3 files changed, 137 insertions(+) create mode 100644 README.org rename README.md => README_old.md (100%) create mode 100644 README_old.md.tmp diff --git a/README.org b/README.org new file mode 100644 index 0000000..fbe8bd8 --- /dev/null +++ b/README.org @@ -0,0 +1,92 @@ +* MSG (Mac Subsystem for Guix) +:PROPERTIES: +:CUSTOM_ID: msg-mac-subsystem-for-guix +:END: +** Description +:PROPERTIES: +:CUSTOM_ID: description +:END: +MSG is an attempt to create a native-like experience for GUIX on MacOS, +using methods inspired by others like Podman/Docker/Lima. + +* !!!!Currently only compatible with M1/M2 Macs +:PROPERTIES: +:CUSTOM_ID: currently-only-compatible-with-m1m2-macs +:END: +** README (WIP) +:PROPERTIES: +:CUSTOM_ID: readme-wip +:END: +*** Prerequisites: +:PROPERTIES: +:CUSTOM_ID: prerequisites +:END: +- qemu +- wget +- git +- xquartz (optional for GUI applications) + +*** Installation +:PROPERTIES: +:CUSTOM_ID: installation +:END: +1. clone the project using + =git clone https://pagure.io/MSG/msg-qemu.git ~/.guix= + +2. copy Guix.app from ~/.guix to your Applications folder + +3. Run the guix application (this will take a minute to download the + most recent image) + +4. add these lines to your shell rc file (bashrc/zshrc) to access the + guix environment from MacOS : + + #+begin_example + alias guix="ssh -i $HOME/.guix/ssh-cert/msg_rsa admin@127.0.0.1 -p 9001 'guix'" + alias guix-env='f(){ ssh -i $HOME/.guix/ssh-cert/msg_rsa admin@127.0.0.1 -p 9001 /home/admin/.guix-profile/bin/$@; unset -f f; }; f' + alias guix-app='f(){ ssh -X -i $HOME/.guix/ssh-cert/msg_rsa admin@127.0.0.1 -p 9001 /home/admin/.guix-profile/bin/$@; unset -f f; }; f' + alias guix-shell="ssh -i $HOME/.guix/ssh-cert/msg_rsa admin@127.0.0.1 -p 9001" + #+end_example + +5. Make sure to restart your terminal or source your shellrc file after + editing it (e.g =source ~/.bashrc=) + +*** Available Commands (after adding bashrc/zshrc options) +:PROPERTIES: +:CUSTOM_ID: available-commands-after-adding-bashrczshrc-options +:END: +- guix : A straight passthrough to the guix application +- guix-shell: Connect to the vm over ssh +- guix-env : Can be used to pass cli commands interactively +- guix-app : Used to passthrough X11 applications from the vm to macos + using xquartz + +*** Notes: +:PROPERTIES: +:CUSTOM_ID: notes +:END: +- Currently =guix-env sudo guix system reconfigure /etc/config.scm= is + not supported. You must use =guix-shell= to ssh into the environment + and then run =sudo guix system reconfigure /etc/config.scm= +- The host home directory is mounted as /mnt/macos in the virtual + environment +- The default user/credentials are admin/admin +- For xquartz to be able to display X11 apps forwarded from the vm, you + must open xquartz and go to Top + Menu->Xquartz->Settings->Security->Enable 'Allow connections from + network clients' +- If xquartz is enabled, you can use the .app files under ~/.guix/apps + to launch guix programs from macos + +*** Discord: +:PROPERTIES: +:CUSTOM_ID: discord +:END: +Feel free to join the discord server and ask questions/share your +experiences! https://discord.gg/TqMDT6Gf6W + +*** Interested in supporting the project? +:PROPERTIES: +:CUSTOM_ID: interested-in-supporting-the-project +:END: +Liberapay : https://liberapay.com/SuperKamiGuru/donate diff --git a/README.md b/README_old.md similarity index 100% rename from README.md rename to README_old.md diff --git a/README_old.md.tmp b/README_old.md.tmp new file mode 100644 index 0000000..ded26be --- /dev/null +++ b/README_old.md.tmp @@ -0,0 +1,45 @@ +# MSG (Mac Subsystem for Guix) +## Description +MSG is an attempt to create a native-like experience for GUIX on MacOS, using methods inspired by others like Podman/Docker/Lima. + +# !!!!Currently only compatible with M1/M2 Macs +## README (WIP) + +### Prerequisites: +- qemu +- wget +- git +- xquartz (optional for GUI applications) + +### Installation +1. clone the project using `git clone https://pagure.io/MSG/msg-qemu.git ~/.guix` +2. copy Guix.app from ~/.guix to your Applications folder +3. Run the guix application (this will take a minute to download the most recent image) +4. add these lines to your shell rc file (bashrc/zshrc) to access the guix environment from MacOS : + ``` + alias guix="ssh -i $HOME/.guix/ssh-cert/msg_rsa admin@127.0.0.1 -p 9001 'guix'" + alias guix-env='f(){ ssh -i $HOME/.guix/ssh-cert/msg_rsa admin@127.0.0.1 -p 9001 /home/admin/.guix-profile/bin/$@; unset -f f; }; f' + alias guix-app='f(){ ssh -X -i $HOME/.guix/ssh-cert/msg_rsa admin@127.0.0.1 -p 9001 /home/admin/.guix-profile/bin/$@; unset -f f; }; f' + alias guix-shell="ssh -i $HOME/.guix/ssh-cert/msg_rsa admin@127.0.0.1 -p 9001" + ``` +5. Make sure to restart your terminal or source your shellrc file after editing it (e.g `source ~/.bashrc`) + +### Available Commands (after adding bashrc/zshrc options) +- guix : A straight passthrough to the guix application +- guix-shell: Connect to the vm over ssh +- guix-env : Can be used to pass cli commands interactively +- guix-app : Used to passthrough X11 applications from the vm to macos using xquartz + +### Notes: +- Currently `guix-env sudo guix system reconfigure /etc/config.scm` is not supported. You must use `guix-shell` to ssh into the environment and then run `sudo guix system reconfigure /etc/config.scm` +- The host home directory is mounted as /mnt/macos in the virtual environment +- The default user/credentials are admin/admin +- For xquartz to be able to display X11 apps forwarded from the vm, you must open xquartz and go to Top Menu->Xquartz->Settings->Security->Enable 'Allow connections from network clients' +- If xquartz is enabled, you can use the .app files under ~/.guix/apps to launch guix programs from macos + +### Discord: +Feel free to join the discord server and ask questions/share your experiences! +https://discord.gg/TqMDT6Gf6W + +### Interested in supporting the project? +Ko-fi : https://ko-fi.com/superkamiguru