You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not endorsing this activity and I'm only sharing information that is
helpful in case you want to try something similar to what I did.
Especially if you are not confident nor familiar with handling the
configuration of NixOS at all, why don't you play with it safely with virtual
computer first?
What's Not Working or Not Great
let's list what's not great first so that it's out of the way
while the disk encryption (installation wizard asks you and set this up if you
wish) works, the surface keyboard will not work until you type the pass
phrase, so you need a USB keyboard to be able to type that
there is on screen keyboard icons appears sometimes but it didn't work for
me
this situation of course might change in the future, so YMMV
I haven't tried to make secure boot working - maybe one day
if you don't like that secure boot is unlocked (which is necessary during
the installation), good luck with that...:
make sure to
cd dotfiles && cp mix-and-match-template.nix mix-and-match.nix (and
leave only the one you need - at least recipes/surface-pro-intel.nix)
importing nixos-hardware (recipes/surface-pro-intel.nix) will requires
building the custom kernel which takes time and uses CPU intensively during
the compilation
aka it will stay hot and noisy for a while
you might want to limit cores to avoid high temperature and noise if you
are ok with longer time building kernel
since it takes time and resource, make sure to have enough battery left to
go on in case the power is not connected
After I became confident that I rather continue using NixOS daily than Windows
11, I did shrink the partition on the disk for Windows 11 even more but how can
I grow the partition of NixOS?
Now you need GParted! (unless you know a better way to
do it).
First let me list what's either impossible or not great:
Windows Disk Manager that we used to shrink the partition of Windows
I couldn't find a way to merge the two partitions (unallocated one on the
left and existing NixOS one on the right)
that's why we need GParted!
GParted running on NixOS
you can run GParted on NixOS but how can you manipulate the partition when
it's mounted on very system that is running everything?
it's like a doctor can't operate on their own body, you need another
surgeon to do it for you!
I mean... let me know if you know this way is possible
GParted live disk (USB/CD)
it's like similar to prepare an NixOS installation medium and run it but the
content is GParted
but you will encounter that your keyboard and touchpad will not work
if you have usb keyboard and mouse, that probably would work
but even so, the UX seems not so great
If you still have the USB stick with NixOS install image, it actually comes with
GParted!
actually since I wasn't using the swap partition, it was realatively straight forward but if you were using swap partition, I assume it's not this simple
prepare the image on the stick if you don't have already
boot with the stick
close the installation app
open GParted (click activity on the left top corner to find one)
apply (GParted doesn't do anything until you actually apply) - and since it's
a risky operation make sure that your device doesn't turn off during the
operation
turn off the computer (find the power option from the right top corner and
shutdown) and remove the USB stick
pray for booting - (but seriously) you better be ready for the case that it
doesn't boot anymore after Resize/Move
Dealing with Freezing Due to OOM
It turns out unlike the usual experience with using macOS or Windows 10/11, which are configured to prevent freezing the desktop session due to OOM, it can be left up to users to configure stuff on linux.
You may find this link useful to deal with the freezing if you are experiencing that, https://github.com/ryuheechul/dotfiles/blob/master/nix/nixos/recipes/oom.nix.
https://borretti.me/article/nixos-for-the-impatient for people who are relatively new to NixOS