diff options
author | Ryan Schanzenbacher <ryan@rschanz.org> | 2023-12-28 01:14:23 -0500 |
---|---|---|
committer | Ryan Schanzenbacher <ryan@rschanz.org> | 2023-12-28 01:14:23 -0500 |
commit | fe084704fe16366028cae4656ad5f440c145c720 (patch) | |
tree | ede96dc52d144ba074358ad64cb3c87b166f20a5 /deploy.sh | |
parent | bb6abc0ca5c5cdf6717a46d11dcc8c7749977a1f (diff) |
updated channels
Diffstat (limited to 'deploy.sh')
-rwxr-xr-x | deploy.sh | 28 |
1 files changed, 24 insertions, 4 deletions
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | gather_env() { | 3 | gather_env() { |
4 | # Gather needed information | 4 | # Gather needed information |
5 | echo -n "Type 'e' for encrypted or 'd' for decrypted install: " | 5 | echo -n "Type 'eb' for encrypted w/ boot, 'en' for encrypted w/o boot, or 'd' for decrypted install: " |
6 | read install_type | 6 | read install_type |
7 | 7 | ||
8 | echo -n "Type system hostname: " | 8 | echo -n "Type system hostname: " |
@@ -17,6 +17,13 @@ gather_env() { | |||
17 | echo -n "Type device file for SWAP: " | 17 | echo -n "Type device file for SWAP: " |
18 | read swap_dev | 18 | read swap_dev |
19 | 19 | ||
20 | echo -n "Add local device on network as substitute server? (y/n): " | ||
21 | read add_local_sub | ||
22 | if [ "$add_local_sub" == "y" ] | ||
23 | then | ||
24 | echo -n "Enter IP address of server: " | ||
25 | read substitute_ip | ||
26 | fi | ||
20 | } | 27 | } |
21 | 28 | ||
22 | copy_and_prepare() { | 29 | copy_and_prepare() { |
@@ -37,14 +44,14 @@ copy_and_prepare() { | |||
37 | 44 | ||
38 | # We are installing! | 45 | # We are installing! |
39 | # Copy template to root of repo | 46 | # Copy template to root of repo |
40 | if [ "$install_type" == "e" ] | 47 | if [ "$install_type" == "eb" ] |
41 | then | 48 | then |
42 | cp ./modules/ryan-config/deploy-templates/HostTemplateEncrypted ./$install_hostname.scm | 49 | cp ./modules/ryan-config/deploy-templates/HostTemplateEncrypted ./$install_hostname.scm |
43 | elif [ "$install_type" == "d" ] | 50 | elif [ "$install_type" == "d" ] |
44 | then | 51 | then |
45 | cp ./modules/ryan-config/deploy-templates/HostTemplate ./$install_hostname.scm | 52 | cp ./modules/ryan-config/deploy-templates/HostTemplate ./$install_hostname.scm |
46 | else | 53 | else |
47 | echo "Invalid install type (not d or e), bailing!" | 54 | echo "Invalid install type (not eb, en, or d), bailing!" |
48 | exit 1 | 55 | exit 1 |
49 | fi | 56 | fi |
50 | 57 | ||
@@ -62,11 +69,24 @@ copy_and_prepare() { | |||
62 | echo "Installing non-guix signing keys for substitutes..." | 69 | echo "Installing non-guix signing keys for substitutes..." |
63 | curl -o sign-key.pub https://substitutes.nonguix.org/signing-key.pub | 70 | curl -o sign-key.pub https://substitutes.nonguix.org/signing-key.pub |
64 | guix archive --authorize < sign-key.pub | 71 | guix archive --authorize < sign-key.pub |
72 | |||
73 | if [ "$add_local_sub" == "y" ] | ||
74 | then | ||
75 | echo "Installing local substitute server's signing keys" | ||
76 | curl -o local-sign.pub http://$substitute_ip/signing-key.pub | ||
77 | guix archive --authorize < local-sign.pub | ||
78 | fi | ||
65 | } | 79 | } |
66 | 80 | ||
67 | install_system() { | 81 | install_system() { |
68 | echo "Beginning install!" | 82 | echo "Beginning install!" |
69 | 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 $install_hostname.scm /mnt | 83 | if [ "$add_local_sub" == "y"] |
84 | then | ||
85 | guix time-machine -C ./channels.scm -- system -L ./modules --substitute-urls="http://$substitute_ip https://substitutes.nonguix.org https://bordeaux.guix.gnu.org https://ci.guix.gnu.org" init $install_hostname.scm /mnt | ||
86 | else | ||
87 | 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 $install_hostname.scm /mnt | ||
88 | fi | ||
89 | |||
70 | } | 90 | } |
71 | 91 | ||
72 | install_user_env() { | 92 | install_user_env() { |