Skip to content

I-Want-ToBelieve/devos

Repository files navigation

Nix Configuration

This repository is home to the nix code that builds my systems.

Why Nix?

Nix allows for easy to manage, collaborative, reproducible deployments. This means that once something is setup and configured once, it works forever. If someone else shares their configuration, anyone can make use of it.

This flake is configured with the use of digga.

NixOS

NixOS_Check NixOS_Fmt


I-Want-ToBelieve's Dotfiles

NixOS logo


NixOS / Home-Manager / Flake

NixOS Desktop





🔧 Installation

  1. Download iso

    # Yoink nixos-unstable
    wget -O nixos.iso https://channels.nixos.org/nixos-unstable/latest-nixos-minimal-x86_64-linux.iso
    
    # Write it to a flash drive
    cp nixos.iso /dev/sdX
  2. Boot into the installer.

  3. Switch to root user: sudo su -

  4. Partitioning

    We create a 512MB EFI boot partition (/dev/nvme0n1p1) and the rest will be our LUKS encrypted physical volume for LVM (/dev/nvme0n1p2).

    $ gdisk /dev/nvme0n1
    • o (create new empty partition table)
    • n (add partition, 512M, type ef00 EFI)
    • n (add partition, remaining space, type 8e00 Linux LVM)
    • w (write partition table and exit)

    Setup the encrypted LUKS partition and open it:

    $ cryptsetup luksFormat /dev/nvme0n1p2
    $ cryptsetup config /dev/nvme0n1p2 --label cryptroot
    $ cryptsetup luksOpen /dev/nvme0n1p2 encrypted

    We create two logical volumes, a 24GB swap parition and the rest will be our root filesystem

    $ pvcreate /dev/mapper/encrypted
    $ vgcreate vg /dev/mapper/encrypted
    $ lvcreate -L 24G -n swap vg
    $ lvcreate -l '100%FREE' -n root vg

    Format partitions

    $ mkfs.fat -F 32 -n boot /dev/nvme0n1p1
    $ mkswap -L swap /dev/vg/swap
    $ swapon /dev/vg/swap
    $ mkfs.btrfs -L root /dev/vg/root

    Mount partitions

    $ mount -t btrfs /dev/vg/root /mnt
    
    # Create the subvolumes
    $ btrfs subvolume create /mnt/root
    $ btrfs subvolume create /mnt/home
    $ btrfs subvolume create /mnt/nix
    $ btrfs subvolume create /mnt/log
    $ umount /mnt
    
    # Mount the directories
    $ mount -o subvol=root,compress=zstd,noatime,ssd,space_cache=v2 /dev/vg/root /mnt
    $ mkdir -p /mnt/{home,nix,var/log}
    $ mount -o subvol=home,compress=zstd,noatime,ssd,space_cache=v2 /dev/vg/root /mnt/home
    $ mount -o subvol=nix,compress=zstd,noatime,ssd,space_cache=v2 /dev/vg/root /mnt/nix
    $ mount -o subvol=log,compress=zstd,noatime,ssd,space_cache=v2 /dev/vg/root /mnt/var/log
    
    # Mount boot partition
    $ mkdir /mnt/boot
    $ mount /dev/nvme0n1p1 /mnt/boot
  5. Enable flakes

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

    $ nixos-install --flake github:I-Want-ToBelieve/dotfiles#asus --impure



👥 People

⚠️
If you stole something from here at least give us credits!
Powered by NixOS/Linux x86_64

These are the people who build and maintain this repository.

I-Want-ToBelieve - sioodmy - fufexan




Applelications Style: kvantum-dark and GTK is WhiteSur-Dark-solid kvantum: MontereyDark Cursors: Future-dark Cursors Icons: Mkos-Big-Sur-Night Colors: MkosBigSur-Dark Plasma Style: AppleDark-All

Human-friendly.

Less is a special case of more, if x is array then return x else return arrayify(x).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published