aboutsummaryrefslogtreecommitdiff
path: root/README.org
diff options
context:
space:
mode:
Diffstat (limited to 'README.org')
-rw-r--r--README.org34
1 files changed, 15 insertions, 19 deletions
diff --git a/README.org b/README.org
index 10d6840..89d4f28 100644
--- a/README.org
+++ b/README.org
@@ -3,49 +3,45 @@
** Instructions - setting up a new NixOS installation
*** 1. Prepare the USB stick
Get the link for the [[https://nixos.org/nixos/download.html][NixOS ISO image]] and burn it to the USB stick:
-#+BEGIN_SOURCE shell
+#+BEGIN_SRC shell
NIXOS_URL='https://releases.nixos.org/nixos...linux.iso'
curl https://euandre.org/dotfiles/nixos/burn.sh | bash -s "$NIXOS_URL" /dev/sdb
-#+END_SOURCE
+#+END_SRC
*** 2. Performing a fresh install
Put the USB stick in the new laptop and boot from it.
First we need to get the internet connection working. Check that the wireless interface name is actually =wlp2s0= or something else (use =ip a= of =ifconfig= for that), and use =wpa_supplicant= to perform the connection:
-#+BEGIN_SOURCE shell
+#+BEGIN_SRC shell
wpa_supplicant -B -i wlp2s0 -c <(wpa_passphrase SSID PASSPHRASE)
-#+END_SOURCE
+#+END_SRC
Now we need to also double check the driver name with =lsblk=. We'll assume it's =/dev/sda=.
After that all we need is to download the installation script and run it with the correct arguments:
-#+BEGIN_SOURCE shell
+#+BEGIN_SRC shell
curl https://euandre.org/dotfiles/nixos/install.sh > install.sh
chmod +x install.sh
LAPTOP_NAME='velhinho-nixos'
./install.sh "${LAPTOP_NAME}" /dev/sda
-#+END_SOURCE
+#+END_SRC
*** 3. Bootstraping the new installation's configuration and data
-After booting up from the freshly installed NixOS, we'll need the GPG keys to decrypt the Git Annex repo, decrypt the SSH keys and bootstrap from there.
+After booting up from the freshly installed NixOS, login into the *GNOME+Xorg* option on the top right corner. Connect again to the internet using the network applet and launch a terminal window.
+
+Now we'll need the GPG keys to decrypt the Git Annex repo, decrypt the SSH keys and bootstrap from there.
-Get the =keys.gpg= file with both private and public keys (see [[#exporting-gpg-key-pairs][exporting GPG keys]] below on how to do that) and run the setup script:
-#+BEGIN_SOURCE shell
+Get the =keys.gpg= file with both private and public keys (see [[#exporting-gpg-key-pairs][exporting GPG keys]] below on how to do that) from the external disk and run the setup script:
+#+BEGIN_SRC shell
curl https://euandre.org/dotfiles/nixos/setup.sh | bash -s ~/path/to/keys.gpg
-#+END_SOURCE
+#+END_SRC
Now open up Firefox and login back to it! That's all!
** Resources
*** Exporting GPG key pairs
:PROPERTIES:
:CUSTOM_ID: exporting-gpg-key-pairs
:END:
-Put =private.gpg= and =public.gpg= files in UTCLOUD (the actual HD drive)
+Export the GPG data using =export-keys.sh= and put it in a disk drive to do an offline transfer:
#+BEGIN_SRC shell
- gpg --export -a EuAndreh > public.gpg
- gpg --export-secret-keys -a EuAndreh > private
- gpg --cipher-algo AES256 -c private
- shred private
- rm private
- mv public.gpg ~/UTCLOUD/public.gpg
- mv private.gpg ~/UTCLOUD/private.gpg
- cp $DOTFILES/encrypted/password-hash.txt ~/UTCLOUD/password-hash.txt
+export-keys.sh
+mv EuAndreh.tar.gpg ~/UTCLOUD/
#+END_SRC
*** Paperkey
Paperkey generate using: