summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Schanzenbacher <ryan@rschanz.org>2023-09-29 15:18:09 -0400
committerRyan Schanzenbacher <ryan@rschanz.org>2023-09-29 15:18:09 -0400
commit9a6ae200dd72059cafc6d3fa59666134d438fba7 (patch)
tree3b9051dd1677f8c03e5b69aa3dc80ed391bd8e6a
parentc33fb8d0829c67a9f30f81cd84771058a09a5fe3 (diff)
final (\?) changes for the presentation demo
-rwxr-xr-xdeploy.sh48
-rw-r--r--modules/ryan-config/base-system.scm9
2 files changed, 50 insertions, 7 deletions
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() {
61 # Install the non-guix signing keys 61 # Install the non-guix signing keys
62 echo "Installing non-guix signing keys for substitutes..." 62 echo "Installing non-guix signing keys for substitutes..."
63 curl -o sign-key.pub https://substitutes.nonguix.org/signing-key.pub 63 curl -o sign-key.pub https://substitutes.nonguix.org/signing-key.pub
64 curl -o sign-key-r.pub http://129.21.92.78:8000/signing-key.pub 64 curl -o sign-key-r.pub http://129.21.94.53:8000/signing-key.pub
65 guix archive --authorize < sign-key.pub 65 guix archive --authorize < sign-key.pub
66 guix archive --authorize < sign-key-r.pub 66 guix archive --authorize < sign-key-r.pub
67} 67}
68 68
69install_system() { 69install_system() {
70 echo "Beginning install!" 70 echo "Beginning install!"
71 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 71 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
72} 72}
73 73
74install_user_env() { 74install_user_env() {
@@ -90,16 +90,54 @@ if [[ $* == *-p ]]
90then 90then
91 echo "Installing non-guix signing keys for substitutes..." 91 echo "Installing non-guix signing keys for substitutes..."
92 curl -o sign-key.pub https://substitutes.nonguix.org/signing-key.pub 92 curl -o sign-key.pub https://substitutes.nonguix.org/signing-key.pub
93 #curl -o sign-key-r.pub http://129.21.92.78:8000/signing-key.pub 93 curl -o sign-key-r.pub http://129.21.94.53:8000/signing-key.pub
94 #guix archive --authorize < sign-key.pub 94 guix archive --authorize < sign-key.pub
95 #guix archive --authorize < sign-key-r.pub 95 guix archive --authorize < sign-key-r.pub
96 guix time-machine -C ./channels.scm -- pull 96 guix time-machine -C ./channels.scm -- pull
97 exit 0 97 exit 0
98elif [[ $* == *-i ]] 98elif [[ $* == *-i ]]
99then 99then
100 gather_env 100 gather_env
101 # Associate devs with uuids
102 root_uuid=`blkid $root_dev | awk -F\" '{print $2}'`
103 boot_uuid=`blkid $boot_dev | awk -F\" '{print $2}'`
104 swap_uuid=`blkid $swap_dev | awk -F\" '{print $2}'`
105 # Let's a go!
106 echo "Information gathered. Deploying Guix on $root_dev ($root_uuid) with boot on $boot_dev ($boot_uuid) and swap on $swap_dev ($swap_uuid)"
107 echo -n "Proceed? (y/n): "
108 read install_choice
109
110 if [ "$install_choice" != "y" ]
111 then
112 echo "Bailing!"
113 exit 1
114 fi
115
116 # We are installing!
117 # Copy template to root of repo
118 if [ "$install_type" == "e" ]
119 then
120 cp ./modules/ryan-config/deploy-templates/HostTemplateEncrypted ./$install_hostname.scm
121 elif [ "$install_type" == "d" ]
122 then
123 cp ./modules/ryan-config/deploy-templates/HostTemplate ./$install_hostname.scm
124 else
125 echo "Invalid install type (not d or e), bailing!"
126 exit 1
127 fi
128
129 # Correct the information
130 sed -i "s/ChangeMe_ROOT/$root_uuid/" ./$install_hostname.scm
131 sed -i "s/ChangeMe_BOOTEFI/$boot_uuid/" ./$install_hostname.scm
132 sed -i "s/ChangeMe_SWAP/$swap_uuid/" ./$install_hostname.scm
133 sed -i "s/ChangeMe_HOST/$install_hostname/" ./$install_hostname.scm
134
135 # Install!
136 echo "Mounting /gnu/store to destination disk..."
137 herd start cow-store /mnt
101 install_system 138 install_system
102 install_user_env 139 install_user_env
140 exit 0
103fi 141fi
104 142
105gather_env 143gather_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 @@
186 (guix-configuration 186 (guix-configuration
187 (inherit config) 187 (inherit config)
188 (substitute-urls 188 (substitute-urls
189 (append (list "https://substitutes.nonguix.org") 189 (append (list "https://substitutes.nonguix.org" "http://129.21.94.53:8080")
190 %default-substitute-urls)) 190 %default-substitute-urls))
191 (authorized-keys 191 (authorized-keys
192 (cons* (plain-file "non-guix.pub" 192 (cons* (plain-file "non-guix.pub"
@@ -195,7 +195,12 @@
195 (curve Ed25519) 195 (curve Ed25519)
196 (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#) 196 (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)
197 ) 197 )
198 )" ) %default-authorized-guix-keys)))) 198 )" )
199 (plain-file "ryan-key.pub"
200 "(public-key
201 (ecc
202 (curve Ed25519)
203 (q #24ED64A7C001DAC05D47F586623EAC4C1F4BD2D267686D5781A9098808160ADC#)))" ) %default-authorized-guix-keys))))
199 (udev-service-type config => 204 (udev-service-type config =>
200 (udev-configuration 205 (udev-configuration
201 (inherit config) 206 (inherit config)