summaryrefslogtreecommitdiffstats
path: root/microsoft
diff options
context:
space:
mode:
authorEmery Hemingway <emery@vfemail.net>2016-02-26 11:42:57 +0100
committerEmery Hemingway <emery@vfemail.net>2016-02-26 11:42:57 +0100
commitfe0e5b767e35eee3d2ebf0417e7bed1d62c06196 (patch)
tree5887cf7322bc437ee9228846de87bdbb9f0ad2b1 /microsoft
parentd6f9447f9df9b8d3b8c296e4ed22ba2e830cc5cc (diff)
import https://nixos.org/wiki/Microsoft_Surface_Pro_3
Fixes https://github.com/NixOS/nixpkgs/issues/13167
Diffstat (limited to 'microsoft')
-rw-r--r--microsoft/surface_pro_3.nix8
-rw-r--r--microsoft/surface_pro_3.wiki41
2 files changed, 49 insertions, 0 deletions
diff --git a/microsoft/surface_pro_3.nix b/microsoft/surface_pro_3.nix
new file mode 100644
index 0000000..48528f9
--- /dev/null
+++ b/microsoft/surface_pro_3.nix
@@ -0,0 +1,8 @@
+{ ... }:
+
+{
+ # to use the type cover in the initrd
+ boot.kernelModules = [ "hid-microsoft" ];
+
+ networking.wireless.enable = true;
+}
diff --git a/microsoft/surface_pro_3.wiki b/microsoft/surface_pro_3.wiki
new file mode 100644
index 0000000..9ffdc55
--- /dev/null
+++ b/microsoft/surface_pro_3.wiki
@@ -0,0 +1,41 @@
+Work in progress. This is the setup for a dual-boot windows/NixOS.
+
+== Installation ==
+
+Current requirements:
+* USB stick
+* Latest unstable minimal installation iso, I used [[https://nixos.org/releases/nixos/unstable/nixos-15.05pre61665.4c01e6d/nixos-minimal-15.05pre61665.4c01e6d-x86_64-linux.iso the 15.06-pre one]]
+* (maybe) USB keyboard and therefore a USB hub
+* WiFi SSID and password
+
+In the current installation iso, the kernel doesn't support the MS Type cover yet, so you need a USB keyboard for the initial install. Also note that at one point the keyboard wasn't working, and I couldn't see it in lsusb output. After a cold boot it worked fine.
+
+=== Steps ===
+
+Preparation:
+* Copy the ISO to the USB stick as explained [[https://nixos.org/nixos/manual/sec-installation.html#sec-booting-from-usb in the manual]]. Note that if you just dd the image onto the USB stick, it will boot without changes
+* With Windows Disk Management, shrink the windows disk so you have room for your installation. Use the free space to create a new partition without a filesystem or drive letter.
+* Check out [[https://github.com/cransom/surface-pro-3-nixos this expression and set of patches]] and add it to support newer versions of the Type Cover as well as enable the touch screen.
+
+* Reboot the Surface and furiously tap Esc until you end up in the BIOS screen. There, turn off secure boot (don't delete the keys), and change the boot order to USB + SSD. Save.
+* You should now be in the NixOS installer
+* Attach the USB stick and keyboard if the Type Cover doesn't work. The NixOS manual is at alt+F8
+
+Installation:
+* Using gdisk, print your partition table to find the empty partition you created. Find the EFI partition number (1 for me) and your new partition number (5 for me).
+* Create your filesystem of choice on the partition, I picked btrfs: `mkfs.btrfs -L root /dev/disk/by-id/xxx-5` (xxx is the samsung ssd). Mount it on /mnt.
+** With btrfs it's wise to put the nix store in its own subvolume: `btrfs subvol create /mnt/nix; btrfs subvol create /mnt/nix/store`
+* We'll be using Gummiboot, which needs to access the EFI partition. `mkdir /mnt/boot; mount /dev/disk/by-id/xxx-1`
+* Initialize your hardware configuration: `nixos-generate-config --root /mnt`
+* Create your wifi credentials: `wpa_passphrase SSID PASS > /etc/wpa_supplicant.conf; cp /etc/wpa_supplicant.conf /mnt/etc`. Check that ifconfig gets an ip address.
+* Edit /mnt/etc/configuration.nix, making sure that you have at least:
+ <nowiki>networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
+
+ boot.kernelPackages = pkgs.linuxPackages_latest;
+ # be able to use the type cover in the initrd
+ boot.kernelModules = [ "hid-microsoft" ];</nowiki>
+* Install: `nixos-install`
+
+If this completes successfully, you should be able to reboot, remove the USB stick, and NixOS should come up.
+
+'''Note''': If using the hid-multitouch patch, you can boot windows as well as other profiles of NixOS without using a usb keyboard.