forked from openoms/bitcoin-tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnixenv.sh
More file actions
53 lines (38 loc) · 1.21 KB
/
Copy pathnixenv.sh
File metadata and controls
53 lines (38 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
# dedicated user
USERNAME=k3d
PASSWORD=""
echo "# add the user: ${USERNAME}"
sudo adduser --system --group --shell /bin/bash --home /home/${USERNAME} ${USERNAME}
echo "Copy the skeleton files for login"
sudo -u ${USERNAME} cp -r /etc/skel/. /home/${USERNAME}/
sudo adduser ${USERNAME} sudo
# set a password
echo "$USERNAME:$PASSWORD" | sudo chpasswd
# docker
if ! docker version 2>/dev/null; then
# look for raspiblitz install script
if [ -f /home/admin/config.scripts/blitz.docker.sh ]; then
/home/admin/config.scripts/blitz.docker.sh on
else
# https://docs.docker.com/desktop/linux/install/debian/
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
fi
fi
sudo groupadd docker
sudo usermod -aG docker $USERNAME
# need to log back in to get the group change
# nix
# manual install step
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
echo "$PATH:/nix/var/nix/profiles/default/bin/nix" >> ~/.bashrc
# direnv
sudo apt install -y direnv
echo "eval \"\$(direnv hook bash)\"" >> ~/.bashrc
source ~/.bashrc
sudo su - k3d
https://github.com/GaloyMoney/charts
direnv allow
cd dev
make create-cluster