c423af5498029afb64d6bce5a345d90680d4825e
1. Installation of new servers
- install ubuntu 20.04
- get age key from SSH
curl https://raw.githubusercontent.com/elitak/nixos-infect/master/nixos-infect | PROVIDER=hetznercloud NIX_CHANNEL=nixos-24.05 bash 2>&1 | tee /tmp/infect.log
nix-shell -p ssh-to-age --run 'ssh-keyscan example.com | ssh-to-age'
- fix secrets files
nix-shell -p sops --run "sops updatekeys -y secrets.yaml"
- run install command
./install.sh example.com
2. Sops command
nix-shell -p sops --run 'sops hosts/cloonar.com/secrets.yaml'
2. Web Server specific
- change the permissions for /var/www
chown nginx:nginx /var/www
chmod 755 /var/www
3. Net data
- Netdata data page: Add a node
- Once you got the token, we will claim it to associate it to a node:
- create /var/lib/netdata/cloud.d/token and write the token in it
- run nix-shell -p netdata --run "netdata-claim.sh -id=$(uuidgen)" as root
- your node should be registered in Netdata cloud
Borg Backup
add ssh key to hetzner cat ~/.ssh/id_rsa.pub | ssh -p23 u149513-subx@u149513-subx.your-backup.de install-ssh-key
4. Add new Host
sftp host.cloonar.com@git.cloonar.com:/config/bootstrap.sh ./
5. Yubikey
ykman fido access change-pin --new-pin 654321
systemd-cryptenroll --fido2-device=auto --fido2-with-client-pin=yes /dev/nvme0n1p2
6. Wireguard
wg genkey | (umask 077 && tee privatekey) | wg pubkey > publickey
umask 0077; wg genpsk > psk
7. Hash for new packages
nix hash to-sri --type sha256 $(nix-prefetch-url https://tar.gz)
Description
Languages
Nix
88.1%
Lua
5.8%
Shell
5.7%
CSS
0.2%
Dockerfile
0.1%