Skip to content

Latest commit

 

History

History
65 lines (48 loc) · 1.82 KB

README.md

File metadata and controls

65 lines (48 loc) · 1.82 KB

Bootstrapping NixOS on 'cloud' VM

'cloud' is an Oracle Cloud free-tier VM:

  • CPU:
    • Ampere A1
    • 4 Cores
  • Memory:
    • 24GB
  • Disk:
    • 200GB

It is installed with the NixOS following this guide to takeover an Ubuntu VM OS

First Run

Here is where I will normally try and setup all the hardware and import the profiles/modules I want from this repo. Since I use the minimal install, I will kick things off like so:

ssh -A root@<ip of host>
nix-shell -p git vim
cd /etc/nixos
# these should no longer be needed if we already have the proper configurations already defined in the repo
sudo mv configuration.nix hardware-configuration.nix /tmp/
sudo git clone https://github.com/billimek/dotfiles.git .
sudo chown -R jeff:users .

Make any edits where necessary or desired, then build the configuration and set the nix user password. Once all is 'clean', it should be possible to reboot and login as the nix user as a complete system.

sudo sh -c "cd /etc/nixos && git pull && nixos-rebuild switch"
passwd jeff
reboot

I will then be able to update the nixos-configuration repo in github and just pull/rebuild as needed on the machine.

sudo sh -c "cd /etc/nixos && git pull && nixos-rebuild switch"

Things that need secrets

1Password bootstrapping auth

eval $(op signin --account <redacted>.1password.com)

atuin login

atuin login --username $(op item get "atuin" --fields label=username) --password $(op item get "atuin" --fields label=password) --key "$(op item get "atuin" --fields label=key)"
atuin import auto
atuin sync

kubeconfig

mkdir -p ~/.kube
op document get --vault kubernetes 'k3s.yaml' --out-file ~/.kube/config