Skip to content

mahmoudk1000/nix-config

Repository files navigation

NixOS System Configurations

built with nix Nix Channel built with garnix Statix Lint

Welcome to nix configuration! This repository contains my NixOS system configurations and dotfiles

I am no Nix expert.

Screenshot

awesomewm desktop screenshot

Installation

Caution

This hosts system and home configurations are public for your own learning and research. They are not meant to be used with any hardware other than mine. Trying to build and deploy them to other systems without appropriate changes can render your machines unbootable and damage data.

My nix configurations runs flakes and home-manager. And it's meant mainly only for my laptop.

Installation Steps

After mounting the partitions, you can move to the second part...

# go inside a nix shell with the specified programs
nix-shell -p git nixUnstable neovim

# create this folder if necessary
mkdir -p /mnt/etc/

# clone the repo
git clone https://github.com/mahmoudk1000/nix-config.git /mnt/etc/nixos

# remove this file
rm /mnt/etc/nixos/hosts/redyf/hardware-configuration.nix

# generate the config and take some files
nixos-generate-config --root /mnt
mv /mnt/etc/nixos/configuration.nix
mv /mnt/etc/nixos/hardware-configuration.nix /mnt/etc/nixos/hosts/labbi

# make sure you're in this path
cd /mnt/etc/nixos

# Install my config:
nixos-install --flake '.#labbi'

If you'd like to use my config as a template, all you need to do is replace "hosts" with your username.

Disko is also available for formatting partitions (Only for advanced users)

Disko

If you save disko's config file in ./disks/default.nix, and run the following command:

sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko ./disks/default.nix --arg device '/dev/nvme0n1'

you will partition, format and mount the disk for /dev/nvme0n1 (change as needed).


Credits

nerdypepper

JavaCafe01

Gvolpe

redyf

linuxmobile