Skip to content

How to install?

Yash Raj edited this page Jul 28, 2024 · 2 revisions
  1. Download minimal iso

  2. Boot into the installer.

  3. Switch to root user: sudo su -

  4. Partitioning

    We create a 512MB EFI boot partition (/dev/sda3), 2GB swap partition on (/dev/sda2) and the rest will be our filesystem (/dev/sda1). replace sda* with your disk name - use lsblk

    Format disk as gpt

    $ parted /dev/sda -- mklabel gpt

    Make the above mentioned partitions:

    $ parted /dev/sda -- mkpart primary 512MiB -2GiB
    $ parted /dev/sda -- mkpart primary linux-swap -2GiB 100%
    $ parted /dev/sda -- mkpart ESP fat32 1MiB 512MiB
    $ parted /dev/sda -- set 3 esp on

    Assing the partitions the respective types. (/dev/sda1 type = ext4 label = root), (/dev/sda2 type = swap label = swap), (/dev/sda3 type = efiboot label = boot). Labelling will later help in hardware-config.nix

    $ mkfs.ext4 -L root /dev/sda1
    $ mkswap -L swap /dev/sda2
    $ mkfs.fat -F 32 -n boot /dev/sda3

    Mount partitions

    $ mount /dev/disk/by-label/root /mnt
    $ mkdir -p /mnt/boot
    $ mount /dev/disk/by-label/boot /mnt/boot
    $ swapon /dev/sda2
  5. Enable flakes & git

    $ nix-shell -p nixFlakes
    $ nix-env -iA nixos.git
  6. Install nixos from flake

    $ nixos-install --flake 'github:mobsenpai/hana#hana'

    or

    $ cd
    $ git clone https://github.com/mobsenpai/hana.git
    $ cd dotfiles
    $ nixos-install --flake .#hana
  7. Reboot, login as normal user. By default initialPassword is used, you can change username and password to your own

  8. Install the home manager configuration

    $ home-manager switch --flake 'github:mobsenpai/hana#yashraj@hana'

    or (if already have dotfiles locally)

    $ cd dotfiles
    $ home-manager switch --flake .#yashraj@hana
  9. Start hyprland by running Hyprland in the TTY session

Clone this wiki locally