final (\?) changes for the presentation demo

9a6ae200dd72… · Ryan Schanzenbacher ·

parent c33fb8d0829c… view tree

Changed files

FileChanges
deploy.sh +43 −5 raw
modules/ryan-config/base-system.scm +7 −2 raw
diff --git a/deploy.sh b/deploy.sh
index 8de8177..4d9df96 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -61,14 +61,14 @@ copy_and_prepare() {
# Install the non-guix signing keys
echo "Installing non-guix signing keys for substitutes..."
curl -o sign-key.pub https://substitutes.nonguix.org/signing-key.pub
- curl -o sign-key-r.pub http://129.21.92.78:8000/signing-key.pub
+ curl -o sign-key-r.pub http://129.21.94.53:8000/signing-key.pub
guix archive --authorize < sign-key.pub
guix archive --authorize < sign-key-r.pub
}
install_system() {
echo "Beginning install!"
- guix time-machine -C ./channels.scm -- system -L ./modules --substitute-urls='http://129.21.92.78:8080/ https://substitutes.nonguix.org https://bordeaux.guix.gnu.org https://ci.guix.gnu.org' init $install_hostname.scm /mnt
+ guix time-machine -C ./channels.scm -- system -L ./modules --substitute-urls='http://129.21.94.53:8080/ https://substitutes.nonguix.org https://bordeaux.guix.gnu.org https://ci.guix.gnu.org' init $install_hostname.scm /mnt
}
install_user_env() {
@@ -90,16 +90,54 @@ if [[ $* == *-p ]]
then
echo "Installing non-guix signing keys for substitutes..."
curl -o sign-key.pub https://substitutes.nonguix.org/signing-key.pub
- #curl -o sign-key-r.pub http://129.21.92.78:8000/signing-key.pub
- #guix archive --authorize < sign-key.pub
- #guix archive --authorize < sign-key-r.pub
+ curl -o sign-key-r.pub http://129.21.94.53:8000/signing-key.pub
+ guix archive --authorize < sign-key.pub
+ guix archive --authorize < sign-key-r.pub
guix time-machine -C ./channels.scm -- pull
exit 0
elif [[ $* == *-i ]]
then
gather_env
+ # Associate devs with uuids
+ root_uuid=`blkid $root_dev | awk -F\" '{print $2}'`
+ boot_uuid=`blkid $boot_dev | awk -F\" '{print $2}'`
+ swap_uuid=`blkid $swap_dev | awk -F\" '{print $2}'`
+ # Let's a go!
+ echo "Information gathered. Deploying Guix on $root_dev ($root_uuid) with boot on $boot_dev ($boot_uuid) and swap on $swap_dev ($swap_uuid)"
+ echo -n "Proceed? (y/n): "
+ read install_choice
+
+ if [ "$install_choice" != "y" ]
+ then
+ echo "Bailing!"
+ exit 1
+ fi
+
+ # We are installing!
+ # Copy template to root of repo
+ if [ "$install_type" == "e" ]
+ then
+ cp ./modules/ryan-config/deploy-templates/HostTemplateEncrypted ./$install_hostname.scm
+ elif [ "$install_type" == "d" ]
+ then
+ cp ./modules/ryan-config/deploy-templates/HostTemplate ./$install_hostname.scm
+ else
+ echo "Invalid install type (not d or e), bailing!"
+ exit 1
+ fi
+
+ # Correct the information
+ sed -i "s/ChangeMe_ROOT/$root_uuid/" ./$install_hostname.scm
+ sed -i "s/ChangeMe_BOOTEFI/$boot_uuid/" ./$install_hostname.scm
+ sed -i "s/ChangeMe_SWAP/$swap_uuid/" ./$install_hostname.scm
+ sed -i "s/ChangeMe_HOST/$install_hostname/" ./$install_hostname.scm
+
+ # Install!
+ echo "Mounting /gnu/store to destination disk..."
+ herd start cow-store /mnt
install_system
install_user_env
+ exit 0
fi
gather_env
diff --git a/modules/ryan-config/base-system.scm b/modules/ryan-config/base-system.scm
index bf16141..c6e5d0e 100644
--- a/modules/ryan-config/base-system.scm
+++ b/modules/ryan-config/base-system.scm
@@ -186,7 +186,7 @@
(guix-configuration
(inherit config)
(substitute-urls
- (append (list "https://substitutes.nonguix.org")
+ (append (list "https://substitutes.nonguix.org" "http://129.21.94.53:8080")
%default-substitute-urls))
(authorized-keys
(cons* (plain-file "non-guix.pub"
@@ -195,7 +195,12 @@
(curve Ed25519)
(q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)
)
- )" ) %default-authorized-guix-keys))))
+ )" )
+ (plain-file "ryan-key.pub"
+ "(public-key
+ (ecc
+ (curve Ed25519)
+ (q #24ED64A7C001DAC05D47F586623EAC4C1F4BD2D267686D5781A9098808160ADC#)))" ) %default-authorized-guix-keys))))
(udev-service-type config =>
(udev-configuration
(inherit config)