mirror of
https://git.in.rschanz.org/ryan77627/guix-config.git
synced 2025-02-10 08:51:16 -05:00
final (\?) changes for the presentation demo
This commit is contained in:
parent
c33fb8d082
commit
9a6ae200dd
2 changed files with 50 additions and 7 deletions
48
deploy.sh
48
deploy.sh
|
@ -61,14 +61,14 @@ copy_and_prepare() {
|
||||||
# Install the non-guix signing keys
|
# Install the non-guix signing keys
|
||||||
echo "Installing non-guix signing keys for substitutes..."
|
echo "Installing non-guix signing keys for substitutes..."
|
||||||
curl -o sign-key.pub https://substitutes.nonguix.org/signing-key.pub
|
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.pub
|
||||||
guix archive --authorize < sign-key-r.pub
|
guix archive --authorize < sign-key-r.pub
|
||||||
}
|
}
|
||||||
|
|
||||||
install_system() {
|
install_system() {
|
||||||
echo "Beginning install!"
|
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() {
|
install_user_env() {
|
||||||
|
@ -90,16 +90,54 @@ if [[ $* == *-p ]]
|
||||||
then
|
then
|
||||||
echo "Installing non-guix signing keys for substitutes..."
|
echo "Installing non-guix signing keys for substitutes..."
|
||||||
curl -o sign-key.pub https://substitutes.nonguix.org/signing-key.pub
|
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.pub
|
||||||
#guix archive --authorize < sign-key-r.pub
|
guix archive --authorize < sign-key-r.pub
|
||||||
guix time-machine -C ./channels.scm -- pull
|
guix time-machine -C ./channels.scm -- pull
|
||||||
exit 0
|
exit 0
|
||||||
elif [[ $* == *-i ]]
|
elif [[ $* == *-i ]]
|
||||||
then
|
then
|
||||||
gather_env
|
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_system
|
||||||
install_user_env
|
install_user_env
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
gather_env
|
gather_env
|
||||||
|
|
|
@ -186,7 +186,7 @@
|
||||||
(guix-configuration
|
(guix-configuration
|
||||||
(inherit config)
|
(inherit config)
|
||||||
(substitute-urls
|
(substitute-urls
|
||||||
(append (list "https://substitutes.nonguix.org")
|
(append (list "https://substitutes.nonguix.org" "http://129.21.94.53:8080")
|
||||||
%default-substitute-urls))
|
%default-substitute-urls))
|
||||||
(authorized-keys
|
(authorized-keys
|
||||||
(cons* (plain-file "non-guix.pub"
|
(cons* (plain-file "non-guix.pub"
|
||||||
|
@ -195,7 +195,12 @@
|
||||||
(curve Ed25519)
|
(curve Ed25519)
|
||||||
(q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)
|
(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-service-type config =>
|
||||||
(udev-configuration
|
(udev-configuration
|
||||||
(inherit config)
|
(inherit config)
|
||||||
|
|
Loading…
Reference in a new issue