aboutsummaryrefslogtreecommitdiff
path: root/nixops/scripts/setup
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-02-21 22:45:23 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-02-21 22:45:23 +0100
commit9690acd9e5ff473fdc88ef13bcc98bb698cfb269 (patch)
tree2fa1019fd6fdb6b53802c672ce6ffdc664c90aa7 /nixops/scripts/setup
parent4795e024ca103932d419e133f02dedbb6ab46a8b (diff)
downloadNix-9690acd9e5ff473fdc88ef13bcc98bb698cfb269.tar.gz
Nix-9690acd9e5ff473fdc88ef13bcc98bb698cfb269.tar.zst
Nix-9690acd9e5ff473fdc88ef13bcc98bb698cfb269.zip
Move private files in a better layout
Diffstat (limited to 'nixops/scripts/setup')
-rwxr-xr-xnixops/scripts/setup10
1 files changed, 5 insertions, 5 deletions
diff --git a/nixops/scripts/setup b/nixops/scripts/setup
index bb433ba..c94b72b 100755
--- a/nixops/scripts/setup
+++ b/nixops/scripts/setup
@@ -50,8 +50,8 @@ if [ ! -f /etc/ssh/ssh_rsa_key_nixops ]; then
50 The key to access private git repositories (websites hosted by the 50 The key to access private git repositories (websites hosted by the
51 server) needs to be accessible to nix builders. It will be put in 51 server) needs to be accessible to nix builders. It will be put in
52 /etc/ssh/ssh_rsa_key_nixops (sudo right is needed for that) 52 /etc/ssh/ssh_rsa_key_nixops (sudo right is needed for that)
53 > pass show $NIXOPS_CONFIG_PASS_SUBTREE_PATH/NixSshKey | sudo tee /etc/ssh/ssh_rsa_key_nixops > /dev/null 53 > pass show $NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/SshKey | sudo tee /etc/ssh/ssh_rsa_key_nixops > /dev/null
54 > pass show $NIXOPS_CONFIG_PASS_SUBTREE_PATH/NixSshKey.pub | sudo tee /etc/ssh/ssh_rsa_key_nixops.pub > /dev/null 54 > pass show $NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/SshKey.pub | sudo tee /etc/ssh/ssh_rsa_key_nixops.pub > /dev/null
55 > sudo chmod u=r,go-rwx /etc/ssh/ssh_rsa_key_nixops 55 > sudo chmod u=r,go-rwx /etc/ssh/ssh_rsa_key_nixops
56 > sudo chown nixbld1:nixbld /etc/ssh/ssh_rsa_key_nixops /etc/ssh/ssh_rsa_key_nixops.pub 56 > sudo chown nixbld1:nixbld /etc/ssh/ssh_rsa_key_nixops /etc/ssh/ssh_rsa_key_nixops.pub
57 Continue? [y/N] 57 Continue? [y/N]
@@ -65,10 +65,10 @@ if [ ! -f /etc/ssh/ssh_rsa_key_nixops ]; then
65 mask=$(umask) 65 mask=$(umask)
66 umask 0777 66 umask 0777
67 # Don’t forward it directly to tee, it would break ncurse pinentry 67 # Don’t forward it directly to tee, it would break ncurse pinentry
68 key=$(pass show $NIXOPS_CONFIG_PASS_SUBTREE_PATH/NixSshKey) 68 key=$(pass show $NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/SshKey)
69 echo "$key" | sudo tee /etc/ssh/ssh_rsa_key_nixops > /dev/null 69 echo "$key" | sudo tee /etc/ssh/ssh_rsa_key_nixops > /dev/null
70 sudo chmod u=r,go=- /etc/ssh/ssh_rsa_key_nixops 70 sudo chmod u=r,go=- /etc/ssh/ssh_rsa_key_nixops
71 pubkey=$(pass show $NIXOPS_CONFIG_PASS_SUBTREE_PATH/NixSshKey.pub) 71 pubkey=$(pass show $NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/SshKey.pub)
72 echo "$pubkey" | sudo tee /etc/ssh/ssh_rsa_key_nixops.pub > /dev/null 72 echo "$pubkey" | sudo tee /etc/ssh/ssh_rsa_key_nixops.pub > /dev/null
73 sudo chmod a=r /etc/ssh/ssh_rsa_key_nixops.pub 73 sudo chmod a=r /etc/ssh/ssh_rsa_key_nixops.pub
74 sudo chown nixbld1:nixbld /etc/ssh/ssh_rsa_key_nixops /etc/ssh/ssh_rsa_key_nixops.pub 74 sudo chown nixbld1:nixbld /etc/ssh/ssh_rsa_key_nixops /etc/ssh/ssh_rsa_key_nixops.pub
@@ -133,7 +133,7 @@ if ! nixops info 2>/dev/null >/dev/null; then
133 EOF 133 EOF
134 read y 134 read y
135 if [ "$y" = "y" -o "$y" = "Y" ]; then 135 if [ "$y" = "y" -o "$y" = "Y" ]; then
136 deployment=$(pass show $NIXOPS_CONFIG_PASS_SUBTREE_PATH/NixDeployment) 136 deployment=$(pass show $NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/Deployment)
137 echo "$deployment" | nixops import 137 echo "$deployment" | nixops import
138 138
139 nixops modify "$(dirname $DIR)/eldiron.nix" 139 nixops modify "$(dirname $DIR)/eldiron.nix"