From cb644bfd47bc35805b3c053873c07c978e67dd95 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Fri, 3 Nov 2023 12:24:31 -0400 Subject: [PATCH] update guix strap and readme --- README.md | 37 +++++++++++-------------------------- guix-strap/guix-install | 12 ++++-------- guix-strap/guix-password | 2 +- guix-strap/guix-prepare | 11 +++++++++++ guix-strap/guix-setup | 1 + 5 files changed, 28 insertions(+), 35 deletions(-) create mode 100644 guix-strap/guix-prepare diff --git a/README.md b/README.md index 770a648..48e14ff 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,14 @@ -# Guix Installation +### dotfiles -## Installing Guix +my personal dot-files -### Instructions +i usse GNU/Guix btw -- Create USB with Guix installation image -- Boot and create partitions using graphical installer -- Bail out right before installation begins, go to terminal - - Mount cow-store using herd start cow-store /mnt - - Download latest version of configuration using `curl -o main.tar.gz --insecure --follow https://g.tylerm.dev/tylerm/dotfiles/archive/main.tar.gz` and unpack using tar - - Authorize nonguix channel using `curl -o signkey.pub https://substitutes.nonguix.org/signing-key.pub and guix archive --authorize < signkey.pub` - - Modify/add system config for system and initialize using `guix time-machine -C channels.scm -- system -L modules/ --substitute-urls='https://bordeaux.guix.gnu.org https://ci.guix.gnu.org https://substitutes.nonguix.org' init system.scm /mnt` - - When installed, proceed -- Reboot into system, assign root and tylerm user a password -- Setup system completely - - Clone guix-config to proper location - - Reconfigure system - - `sudo -E guix time-machine -C channels.scm -- system -L modules reconfigure system.scm` <---- may not be needed - - `guix pull` - - `hash guix` - - `sudo guix system -L modules reconfigure system.scm` - - Configure GUIX Home - - Install Nix Home Manager - - May need to sudo herd restart nix-daemon or reconfigure system to get nix working??? - - `nix-channel --update` - - `nix-shell '' -A install` - - `home-manager switch` -- Everything should now be set up and ready to use :) +### instaliation + +if you wish to install my guix system + +- get a bootable systemcrafters guix iso +- boot into it +- clone this repo `curl -o main.tar.gz --insecure --follow https://g.freya.cat/freya/dotfiles/archive/main.tar.gz` +- cd into guix-strap and run `./guix-setup` diff --git a/guix-strap/guix-install b/guix-strap/guix-install index fbfb19a..e2b83cb 100755 --- a/guix-strap/guix-install +++ b/guix-strap/guix-install @@ -3,20 +3,16 @@ source ./guix-env source ./guix-log -EVENT "Mounting /gnu/store to destination disk..." -herd start cow-store /mnt - -EVENT "Installing non-guix signing keys for substitutes..." -curl -o /tmp/sign-key.pub https://substitutes.nonguix.org/signing-key.pub -guix archive --authorize < /tmp/sign-key.pub +EVENT "Pulling guix channels" +guix pull -C ../channels.scm EVENT "Installing GNU Guix" guix time-machine -C ../channels.scm -- system -L ../modules --substitute-urls='https://substitutes.nonguix.org https://bordeaux.guix.gnu.org https://ci.guix.gnu.org' init ../$HOSTNAME.scm /mnt EVENT "Installing User Environment" -USER=tylerm -guix shell git -- git clone https://g.tylerm.dev/tylerm/dotfiles /mnt/home/$USER/.config/guix +USER=freya +guix shell git -- git clone https://g.freya.cat/freya/dotfiles /mnt/home/$USER/.config/guix cp ../$HOSTNAME.scm /mnt/home/$USER/.config/guix/$HOSTNAME.scm cp ./guix-setup-user /mnt/home/$USER/.zprofile diff --git a/guix-strap/guix-password b/guix-strap/guix-password index 008ad14..a39c566 100755 --- a/guix-strap/guix-password +++ b/guix-strap/guix-password @@ -43,7 +43,7 @@ cat << EOF | chroot /mnt passwd $ROOT_PASSWORD $ROOT_PASSWORD -passwd tylerm +passwd freya $USER_PASSWORD $USER_PASSWORD EOF diff --git a/guix-strap/guix-prepare b/guix-strap/guix-prepare new file mode 100644 index 0000000..307c220 --- /dev/null +++ b/guix-strap/guix-prepare @@ -0,0 +1,11 @@ +#!/run/current-system/profile/bin/bash + +source ./guix-env +source ./guix-log + +EVENT "Mounting /gnu/store to destination disk..." +herd start cow-store /mnt + +EVENT "Installing non-guix signing keys for substitutes..." +curl -o /tmp/sign-key.pub https://substitutes.nonguix.org/signing-key.pub +guix archive --authorize < /tmp/sign-key.pub diff --git a/guix-strap/guix-setup b/guix-strap/guix-setup index 5ee8060..6501aed 100755 --- a/guix-strap/guix-setup +++ b/guix-strap/guix-setup @@ -44,6 +44,7 @@ welcome ./guix-partition ./guix-crypt ./guix-configure +./guix-prepare ./guix-install cleanup