Giter Club home page Giter Club logo

nixos's Introduction

nixos

personal nixos configurations as flake

installation

filesystem

export ROOT_DISK=/dev/sda

# create partitions
sudo parted -a opt --script "${ROOT_DISK}" \
    mklabel gpt \
    mkpart primary fat32 0% 512MiB \
    set 1 esp on \
    name 1 boot \
    mkpart primary 512MiB 100% \
    set 2 lvm on \
    name 2 root

sudo fdisk ${ROOT_DISK} -l

# setup virtuals
sudo vgcreate vg ${ROOT_DISK}2

sudo lvcreate -L 8G -n swap vg
sudo lvcreate -l '100%FREE' -n root vg

sudo lvdisplay

# format partitions
sudo mkfs.fat -F 32 -n boot /dev/disk/by-partlabel/boot
sudo mkfs.ext4 -L root /dev/vg/root
sudo mkswap -L swap /dev/vg/swap

swapon -s

install with flake

# mount for install
sudo mount /dev/disk/by-label/root /mnt
sudo mkdir -p /mnt/boot
sudo mount /dev/disk/by-label/boot /mnt/boot
sudo swapon /dev/vg/swap

# install
nix-shell -p git nixFlakes

sudo git clone --recurse-submodules -j8 https://github.com/aserowy/nixos.git /mnt/etc/dots

# add a new profile with hardware configuration
sudo nixos-install --root /mnt --flake /mnt/etc/dots#<new profile>

reboot

switch channel to unstable for direnv

sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos
sudo nix-channel --update

nixos's People

Contributors

aserowy avatar dependabot[bot] avatar github-actions[bot] avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.