dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

Installing Guix OS and whole config using common linux OS like Ubuntu

Open HumHongeKamyaab opened this issue 4 years ago • 11 comments

Guix beginner here, just want to try Guix OS + your whole config (will change it eventually).

I am plannng to install this Guix OS + your whole config on external SSD, just to try it out and modify it further whenever I have time. It will not stop my usual workflow which uses Ubuntu.

I believe it is possible to do above thing by making bootable USB from my Ubuntu system and then follow the Guix installation process from it and somehow copying yr config files in that.

These are steps I have done to achieve it,

  • Install guix binary using https://guix.gnu.org/manual/en/html_node/Binary-Installation.html on Ubuntu
  • Run following commands on Ubuntu (following https://github.com/daviwil/dotfiles/tree/master/.config/guix/systems/README.md)
git clone https://github.com/daviwil/dotfiles # clone this repo
cd dotfiles
cd .config/guix/systems
guix system disk-image ./install.scm #will make iso file, mount it on USB, install Guix OS on external SSD

The last command is not working and giving following error,

guix system: error: failed to load './install.scm':
ice-9/boot-9.scm:3300:6: In procedure resolve-interface:
no code for module (nongnu packages linux)

Any suggestions to resolve it.

I would like to update this issue further as new issues come out.

HumHongeKamyaab avatar Oct 01 '20 20:10 HumHongeKamyaab

You've done well to make it this far! The part you're missing is setting up the nonguix channel in your Guix configuration:

https://github.com/daviwil/dotfiles/blob/master/.config/guix/channels.scm#L3-L6

Just drop this file in .config/guix/, run guix pull and then try building the ISO again.

daviwil avatar Oct 01 '20 20:10 daviwil

I definitely forgot to part in the installation README, I'll add it in when I get a chance. Thanks for giving it a try!

daviwil avatar Oct 01 '20 20:10 daviwil

I will continue to add more comments here as I progress, which can serve as documentation of other beginners.

HumHongeKamyaab avatar Oct 01 '20 20:10 HumHongeKamyaab

Feel free to send PRs to the README.md too if you'd like, but I'm more than happy to take your feedback and add the changes there myself.

daviwil avatar Oct 01 '20 20:10 daviwil

You've done well to make it this far! The part you're missing is setting up the nonguix channel in your Guix configuration:

https://github.com/daviwil/dotfiles/blob/master/.config/guix/channels.scm#L3-L6

Just drop this file in .config/guix/, run guix pull and then try building the ISO again.

I think you mean here ~/.config/guix/, where ~ is Ubuntu home directory.

HumHongeKamyaab avatar Oct 01 '20 20:10 HumHongeKamyaab

Yep, that's correct.

daviwil avatar Oct 01 '20 20:10 daviwil

Steps to follow till now,

  • Install guix binary using https://guix.gnu.org/manual/en/html_node/Binary-Installation.html on Ubuntu
  • Run following commands on Ubuntu (following https://github.com/daviwil/dotfiles/tree/master/.config/guix/systems/README.md)
# Use this as reference for any Guix command, https://guix.gnu.org/guix-refcard.pdf
# clone this repo
git clone https://github.com/daviwil/dotfiles /tmp/dotfiles
# Now we are installing Guix packages on our Ubuntu machine so that we can make a iso file of this whole config.
# Install non guix things on Ubuntu (Guix)
cp /tmp/dotfiles/.config/guix/.channels.scm ~/.config/guix
guix pull
# make iso file
# mount it on USB
# install Guix OS on external SSD
  • Question Should run guix system disk-image /tmp/dotfiles/.config/guix/systems/install.scm,but how it is making sure to install all packages in manifests folder, as there is no mention of this folder in install.scm. Something is missing here

HumHongeKamyaab avatar Oct 01 '20 20:10 HumHongeKamyaab

It won't install those yet. The install.scm file is self-contained and includes just enough packages to follow the installation process. Once you reach the end of the installation process (before rebooting) you will clone the dotfiles repo and then install the full system configuration, including those manifests.

daviwil avatar Oct 01 '20 20:10 daviwil

It won't install those yet. The install.scm file is self-contained and includes just enough packages to follow the installation process. Once you reach the end of the installation process (before rebooting) you will clone the dotfiles repo and then install the full system configuration, including those manifests.

got yr point. Which command should I run to install full system configuration (dotfiles) in external SSD Guix OS.

HumHongeKamyaab avatar Oct 01 '20 20:10 HumHongeKamyaab

This section explains it at a high level but doesn't give step-by-step commands: https://github.com/daviwil/dotfiles/blob/master/.config/guix/systems/README.md#initial-system-setup

Basically the idea is that you need to log in as your user account which gets created in the previous step and then install the relevant manifests using dotfiles/.bin/activate-profiles desktop emacs (this is a script I wrote to manage multiple profiles/manifests at the same time). Once that is done you can reboot and log in at the graphical prompt and you should get booted into EXWM.

daviwil avatar Oct 01 '20 21:10 daviwil

Steps to follow till now,

  • Install guix binary using https://guix.gnu.org/manual/en/html_node/Binary-Installation.html on Ubuntu
  • Run following commands on Ubuntu (following https://github.com/daviwil/dotfiles/tree/master/.config/guix/systems/README.md)
# Use this as reference for any Guix command, https://guix.gnu.org/guix-refcard.pdf
# clone this repo
git clone https://github.com/daviwil/dotfiles /tmp/dotfiles
# Now we are installing Guix packages on our Ubuntu machine so that we can make a iso file of this whole config.
# Install non guix things on Ubuntu (Guix)
cp /tmp/dotfiles/.config/guix/.channels.scm ~/.config/guix
ln -s ~/.config/guix/current/bin/guix ~/bin/guix
export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
guix pull
# make iso file, will take time
guix system disk-image /tmp/dotfiles/.config/guix/systems/install.scm
# mount it on USB, change disk-image below (see name of disk-image in the output of previous command)
# /dev/sdX, using $lsblk check what is name of USB and change it accordingly
sudo dd if=/gnu/store/nyg6jv3a4l0pbcvb0x7jfsb60k9qalga-disk-image of=/dev/sdX status=progress
# install Guix OS on external SSD 
# https://guix.gnu.org/manual/en/guix.html#Disk-Partitioning
# https://github.com/daviwil/dotfiles/blob/master/.config/guix/systems/README.md#initialsystem-setup
cryptsetup luksFormat /dev/nvme0n1p5
cryptsetup open --type luks /dev/nvme0n1p5 system-root
mkfs.ext4 -L system-root /dev/mapper/system-root
mount LABEL=system-root /mnt
mkdir -p /mnt/boot/efi
mount /dev/<EFI partition> /mnt/boot/efi
git clone https://github.com/daviwil/dotfiles
mkdir -p ~/.config/guix
cp dotfiles/guix/channels.scm ~/.config/guix
guix pull
guix package -m ~/.dotfiles/guix/manifests/desktop.scm
guix pull
hash guix  # This is necessary to ensure the updated profile path is active!
  • Question Its incomplete and still not working

Will first resolve issue #2 and then try to solve this issue

HumHongeKamyaab avatar Oct 02 '20 08:10 HumHongeKamyaab