Skip to content

z0al/dotfiles

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Dotfiles

My NixOS configuration as a flake. It supports multiple hosts:

  • Sandbox: VirtualBox VM for testing
  • Desktop: personal home PC (Soon)
  • Work: work laptop (Soon)

Installation

Partitioning and formatting (UEFI)

Use GParted (or whatever tool you prefer) to setup the following partitions:

  • /boot (>=512MB): Must be labeled BOOT and of type FAT32 with ESP & Boot flags.
  • / (~100GB): Must be labeled nixos and of type EX4.
  • /home (?): Must be labeled home

Don't forget to set the partition table to GPT. For more info consult the official documentation

Mounting

mount /dev/disk/by-label/nixos /mnt

mkdir -p /mnt/boot
mount /dev/disk/by-label/BOOT /mnt/boot

mkdir -p /mnt/home
mount /dev/disk/by-label/home /mnt/home

Generating configs

nixos-generate-config --root /mnt

Installing

nix-env -iA nixos.git
git clone https://github.com/z0al/dotfiles.git && cd dotfiles
nixos-install --flake .#<host-name>

Tips

Local configs

You can use ~/.localrc for machine-specific configs e.g:

echo "export CUSTOM_STUFF=true" > ~/.localrc

Credits

License

MIT © Ahmed T. Ali