final (\?) changes for the presentation demo

This commit is contained in:
Ryan Schanzenbacher 2023-09-29 15:18:09 -04:00
parent c33fb8d082
commit 9a6ae200dd
Signed by: ryan77627
GPG key ID: 81B0E222A3E2308E
2 changed files with 50 additions and 7 deletions

View file

@ -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

View file

@ -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)