nixos configurations
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.2 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. # nixos
  2. These are my configurations for nixos. You are free to use it, however it may be best for you to fork and make your own.
  3. ## Installing
  4. In my experience, you need a larger disk size for the nix store on the installer than is created. As such, I use a swap file/drive, recommended separate drive from the one being installed to.
  5. ### Swap example.
  6. ```bash
  7. mkdir /mnt/usb
  8. mount /dev/sdb1 /mnt/usb
  9. fallocate -l 30G /mnt/usb/swap
  10. chmod 600 /mnt/usb/swap
  11. mkswap /mnt/usb/swap
  12. swapon /mnt/usn/swap
  13. mount -o remount,size=20G,noatime /nix/.rw-store
  14. ```
  15. ### The install process.
  16. After setting up the extra swap space, clone and enter the nixos repo.
  17. ```bash
  18. nix-shell -p git
  19. git clone --recursive https://github.com/GRMrGecko/nixos.git
  20. cd nixos/
  21. ```
  22. After you get into the repo, configure the machine to your liking.
  23. ```bash
  24. ./configure.sh
  25. ```
  26. After configuring, install. You can define a tmpdir as the USB drive with `TMPDIR=/mnt/usb` if you want to reduce load on RAM.
  27. ```bash
  28. ./install.sh --disk main /dev/sda
  29. ```
  30. After install is complete, you can then rsync the nixos dir to the user account on the install:
  31. ```bash
  32. nix-shell -p rsync
  33. mount -o compress=zstd /dev/mapper/crypted /mnt/hdd
  34. rsync -av /root/nixos/ /mnt/hdd/home/grmrgecko/nixos/
  35. umount /mnt/hdd
  36. ```