commit 20038216792e3dce8e72fa4c95a574142f76ac13 parent df92d215abd924c6c42804951eca489e6d57214a Author: Tomas Hlavaty <tom@logand.com> Date: Thu, 29 Aug 2019 14:13:16 +0200 paper notes Diffstat:
A | README | | | 56 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 56 insertions(+), 0 deletions(-)
diff --git a/README b/README @@ -0,0 +1,56 @@ +# NixOS Notes + +## Installation + +Partition Disk + + # lsblk + # parted /dev/sdX -- p + # parted /dev/sdX -- mklabel gpt + # parted /dev/sdX -- mkpart primary 1024MiB 100% + # parted /dev/sdX -- mkpart ESP fat32 256MiB 1024MiB + # parted /dev/sdX -- mkpart GRUB 1MiB 256MiB + # parted /dev/sdX -- set 2 esp on + # parted /dev/sdX -- set 2 boot on + # parted /dev/sdX -- set 3 bios_grub on + # parted /dev/sdX -- align-check optimal 1 + +Format Disks + + # mkfs.vfat -F32 /dev/sdX2 + # cryptsetup -v luksFormat /dev/sdX1 + # cryptsetup luksOpen /dev/sdX1 luksroot + # mkfs.nilfs2 -L root /dev/mapper/luksroot + +Mount Disks + + # mount /dev/mapper/luksroot /mnt + # mkdir /mnt/boot + # mount /dev/sdX2 /mnt/boot + +Install NixOS + + # nixos-generate-config --root /mnt + # ...edit /mnt/etc/nixos/configuration.nix + # nixos-install + # ...set root password + # reboot + +## WiFi from Command Line + + $ sudo wpa_supplicant -B -i iface -c <(wpa_passphrase ssid key) + +## Backups + + $ sudo cryptsetup -v luksFormat /dev/sdX + $ sudo cryptsetup luksOpen /dev/sdX backup + $ sudo cryptsetup luksDump /dev/sdX + $ sudo cryptsetup -v status backup + $ sudo dd if=/dev/zero of=/dev/mapper/backup status=progress bs=128M + $ sudo mkfs.ext3 /dev/mapper/backup + $ sudo mount /dev/mapper/backup /mnt + $ sudo umount /dev/mapper/backup + $ sudo cryptsetup luksClose backup + + $ sudo cryptsetup luksAddKey /dev/sdX + $ sudo cryptsetup luksRemoveKey /dev/sdX