- Install terminal.
- Install JetBrains Mono Nerd Font
ssh-keygen
, save as~/.ssh/nfu_ed25519
, and add toIdentityFile
in~/.ssh/config
, alongside:Host: 127.0.0.1 Port: 2222 User nfu ForwardAgent Yes
(see:dotfiles/_unused/.ssh/config
).- Repeat for
~/.ssh/github_ed25519
, with:Host: github.com User git
. - Add keys to ssh agent, so they can be forwarded to server:
ssh-add ~/.ssh/github_ed25519
. - Add
~/.ssh/github_ed25519.pub
to github.
- Create new arch amd machine, named
arch
, which will get default usermagnus
. - Host:
orb -u root -m <new_machine_name>
,passwd magnus
, and set password tomagnus
. sudo pacman-key init && sudo pacman-key --populate && sudo pacman -Syu --noconfirm archlinux-keyring && sudo pacman -Syu --noconfirm which openssh vim git
, then modifysshd
config,sudo vim /etc/ssh/sshd_config
, to listen to port 2222 (see:dotfiles/_unused/etc/ssh/sshd_config
). Note: File is replaced later, during install.sudo systemctl start sshd && sudo systemctl enable sshd && sudo systemctl reload sshd
, andsudo systemctl reload sshd
every time/etc/ssh/sshd_config
changes.- Host:
ssh-copy-id -i ~/.ssh/nfu_ed25519.pub magnus@nfu
, type password to remote usermagnus
, as set above. - Host: Copy terminfo to default user:
infocmp -x | ssh magnus@nfu -- tic -x -
. ssh magnus@nfu
. If it fails, log in to server withorb
, and check that~/.ssh
has permissions 700, and~/.ssh/authorization_keys
has 600.cd ~ && git clone [email protected]:magnusriga/dotfiles.git
.. ~/dotfiles/scripts/setup_user
.- Host:
ssh-copy-id -i ~/.ssh/nfu_ed25519.pub nfu
, type password to remote usernfu
, which is alsonfu
. - Host: Copy terminfo to new user:
infocmp -x | ssh nfu -- tic -x -
. - Login with new user,
ssh nfu
, then delete orbstackssh_config
:sudo rm -rf /etc/ssh/ssh_config.d/10-orbstack.conf
. cd ~ & git clone [email protected]:magnusriga/dotfiles.git
.. ~/dotfiles/scripts/bootstrap.sh
.
- Build image from Linux (once):
~/dotfiles/host/docker/compose-build.sh -e dev
- Deploy stack from Linux (every time container runs):
./.devcontainer/compose-up.sh -e dev
- If
vscode
, attach to runningnfront
container. - Manually run
pnpm i
andpnpm dev
, as needed.
- Add hooks to
.git/hooks
, by running:pre-commit install
- Run the added hooks on all files:
pre-commit run --all-files
- Install dotfiles (e.g. magnusriga/dotfiles) to get the necessary environment variables (pnpm, node, etc.), and for a better terminal experience.
- Install Hack Nerd Font for the terminal to display icons correctly.
- Docker swarm mode should not be used for development containers, because the containers are recreated when the host restarts.
- Therefore, do not use:
./.devcontainer/stack-build.sh -e dev
and./.devcontainer/stack-deploy.sh -e dev
- Instead, use docker compose build and docker compose up.
- Build image from Linux (once):
./scripts/compose-build.sh -e prod
- Deploy stack from Linux (everytime we run container):
./scripts/stack-deploy.sh -e prod
- Check by visiting: localhost
If git clone does not work:
- Host:
ssh-add -L
, to check public key in ssh-agent. - Remote:
ssh-add -L
, to check it matches public key in ssh-agent in Host.
Other Notes
- Manually add name and email to
.gitconfig
:. ~/dotfiles/_unused/setup_git_credentials.sh
. - Prompt slightly delayed due to
git_status
, remove git status to avoid.