~tardypad/alpine-system

ref: dbca648849517d9d52cb48c5cfb1dc857a86f434 alpine-system/setup/setup-1.sh -rw-r--r-- 2.3 KiB
dbca6488Damien Tardy-Panis setup: system-config is the only package needed to be installed 5 months ago
                                                                                
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
#!/bin/sh

# general setup
setup-alpine -f https://git.sr.ht/~tardypad/alpine-system/blob/master/setup/answer-file

# install extra necessary packages for setup
apk add doas rsync

# create user
adduser -g "Damien Tardy-Panis" damien
adduser damien wheel

# configure doas
echo 'permit persist :wheel' > /etc/doas.d/wheel.conf
chmod 600 /etc/doas.d/wheel.conf

# change default SSH port
sed -i -e "s/#Port 22/Port 11235/" /etc/ssh/sshd_config
rc-service sshd restart

# add SSH authorized keys
mkdir /home/damien/.ssh
{
  echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIZTZxuaFHI9vgMDwDK9r5xbOwg+KlYCMzNWaL13RTwjYBHxxdTNTXgaLbEF8hh8Zm2UVqO0HFJvpjFDDDfDUYMoSQfEJKDkH3FTZAVKHQT0E62r2BBIrEB1vlunr85fewkxGCQAu4pOnJEem94N2qd2qnaWsq4uip+MhXMNy9guEWE469+Ke0kqRcIImhEl7yqE970Rk31WVUFygWbtO8yNl9HhUNp8FF7tMtEoiFDNXhS36i8/wWIPRxqbwvj9UEEhBkKlF0KT5nsD26jT1qr0Df5Jiz0JPUvhK5zdNEaB2TbwUJ5hjmON8hkCwZqjeDSOrZLKylrWWIaapFt9tf'
  echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC8N1c+6k7L2zlKfZ022mFbpsSC9n5TePb4cdnGvIf/U7ZFKvZ+4HaT6tENmZHkMou+Eqm1X0tFZ/j9osLj3G6W5tzEiF1zw//3szUVWZV+g3vf3LzsGv7wIncfser5bAK4BqaE3qvL8wXedXFFKgyjymdMUt9LptJ26YqvpU5Mw3L5TrWCODrqw3iV1/B4w9Mmn9AltFx+mVqJ526q01vhYkJh5ViUiyDGowbd1glws3nK5yPQpSRY5oQxRLAaF0+r3nJedfiC5vQnBknYSP2ZEk7WlO7WKM5IbNILgknEsPcVfR2miP6zz4DoFJ4cy/HBbUt/mwKI/qhQWYlqlhApCclucSt6LQMiRnt/8HpLAY6vYKxBPGVYClQnOrq2aNH9x1MTBc+E1y6U87dLslJqBOP/N09V9Rz8QA7lGEZk0XnJlfy6fqBpH1EqiMuXDxXJgVtKL30Vtlbe1U3jZqU0wH3aysG7qH2xhiEsv2ySi8VYCwlh6PkxOkzJAwdwNguJGLUBhb85tQWk53CNff6E3hpE1lVJLF3c6+5T5FXT15HGoZvIi5MKX5LBFOFRSzY4DOGRmZ8qtyVPcm1tyIddIi53Fol8ftbG45z34/Q6Js0SUQAxN6HtAdtk4bdTvuNV32aSbA5dppgpkWcxj8S4oh7jWvbihv591a4mVA7JCQ=='
} > /home/damien/.ssh/authorized_keys
chown -R damien:damien /home/damien/.ssh

# add personal local repository
echo '/srv/http/pkgs/alpine/tardypad' >> /etc/apk/repositories
cat << EOF > /etc/apk/keys/damien-6220f8bc.rsa.pub
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA+G2dfFcxYwroAmko6VC5
KrH9Yp4iY9wzIEWKQxzQY8VPaQ6wLzUlbAdS1cGWY3tayivxy100oyWatZOKVF+C
iaE38ULpuoLQh3GclpI4uzhmdRjoUc4GYdj5WOqETgoSK1BBI75wn4ri0gl0OIih
yciZ4Pz65Kh0ieZEmql7MWQljr0E+Et7KH/5J1c++utpZC7JRI1GUGMcc1vD9MJG
d/0nrIsZ7SLjqGe3IR7u/BoNkbfpuoQoqXKpHbPmiDeC1r5xoO9Zf6Z0klW4tcRy
dbtFl6YZh0MJnAmj3HF96K8B1+4yID8AuqauXBfayS3VHjNWQ9YExaVbvQLADiWg
kQIDAQAB
-----END PUBLIC KEY-----
EOF