My NixOS Basic no bs bare install guide
Oct 10, 2025
(for legacy bios only)
- Download the iso from this link
- now it's time to partition stuff
Partition table should be like this yo
| Device | Mount Point | Type | Filesystem |
|---|---|---|---|
/dev/vda1 | /boot | boot partition | ext4 |
/dev/vda2 | swap | swap | swap |
/dev/vda3 | / | root | ext4 |
note this is on a qemu system so beware, change partition names according to your need |
- format the partitions
mkfs.ext4 /dev/vda1
mkswap /dev/vda2
mkfs.ext4 /dev/vda3
- Mount these sons of Bits
mount /dev/vda3 /mnt
mkdir /mnt/boot
mount /dev/vda1 /mnt/boot
swapon /dev/vda2
- generate the god damn configuration
nixos-generate-config --root /mnt
vim /mnt/etc/nixos/configuration.nix
- Now change these follwing options i guess.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda"; # not /dev/vda1
networking.hostName = "hostname"; # or any name you want
services.openssh.enable = true;
- then install using this command
nixos-install
- it should be done then reboot using
rebootlol.
For UEFI systems (additional instructions)
If you're on a UEFI system instead of legacy BIOS, here's what changes:
Partition table for UEFI
| Device | Mount Point | Type | Filesystem |
|---|---|---|---|
/dev/vda1 | /boot | EFI System Partition | vfat |
/dev/vda2 | swap | swap | swap |
/dev/vda3 | / | root | ext4 |
Format partitions for UEFI
mkfs.vfat -F 32 /dev/vda1 # EFI partition needs vfat
mkswap /dev/vda2
mkfs.ext4 /dev/vda3Mount stays the same
mount /dev/vda3 /mnt
mkdir /mnt/boot
mount /dev/vda1 /mnt/boot
swapon /dev/vda2Configuration changes for UEFI
Instead of GRUB on legacy BIOS, use systemd-boot:
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "hostname"; # or any name you want
services.openssh.enable = true;
The rest (generate config, install, reboot) stays exactly the same.
Some extra options you should sorta edit
- set time zone
time.timeZone = "Asia/Kolkata";
- setup locale
i18n.defaultLocale = "en_US.UTF-8";User adding
users.users.lordofwizard = {
isNormalUser = true;
extraGroups = [ "wheel" ];
packages = with pkgs; [
tree
htop
];
};