Guest User

Untitled

a guest
Apr 14th, 2017
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. vim /etc/nixos/configuration.nix
  2. boot.supportedFilesystems = [ "zfs" ];
  3.  
  4. nixos-rebuild switch
  5.  
  6. gdisk /dev/sda
  7. Create +16M bios boot, code ef02, set name bios
  8. Create +500M boot, set name boot
  9. Create +500M swap, code 8200, set name swap
  10. Create reset of disk part, code a502, set name zfs
  11.  
  12. zpool create -o ashift=12 -o altroot=/mnt tank /dev/disk/by-partlabel/zfs
  13.  
  14. zfs create -o mountpoint=none tank/root
  15. zfs create -o mountpoint=legacy tank/root/nixos
  16. zfs create -o mountpoint=legacy tank/root/home
  17. zfs set compression=lz4 tank
  18.  
  19. mount -t zfs tank/root/nixos /mnt
  20. mkdir /mnt/home
  21. mount -t zfs tank/root/home /mnt/home
  22.  
  23. mkfs.ext4 -m 0 -j -L boot /dev/disk/by-partlabel/boot
  24. mkdir /mnt/boot
  25. mount /dev/disk/by-partlabel/boot /mnt/boot
  26.  
  27. nixos-generate-config --root /mnt
  28. vim /mnt/etc/nixos/configuration.nix
  29. :read !hostid
  30.  
  31. boot.loader.grub.device = "/dev/disk/by-partlabel/boot";
  32. boot.supportedFilesystems = [ "zfs" ];
  33. networking.hostId = "<the host id from the hostid command>";
  34.  
  35. nixos-install
Advertisement
Add Comment
Please, Sign In to add comment