This repository contains my personal Nix configuration (NixOS and Home Manager). It uses Nix flakes and is meant to be reproducible. Feel free to use, fork, or reference it for your setup.
home/– Home Manager configurations for user environmentsnixos/– NixOS configurations for system-level setupflake.nix– Main Nix flake file, defines inputs/outputsflake.lock– Lock file for reproducible builds
To enable Flakes, add the following line to your configuration.nix file (usually located at /etc/nixos/configuration.nix):
nix.settings.experimental-features = [ "nix-command" "flakes" ];After saving the file, apply the changes by running:
sudo nixos-rebuild switchThis enables both the nix command and Flakes support system-wide.
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
nix-channel --update
nix-shell '<home-manager>' -A installgit clone https://github.com/RahulGotrekiya/nix-configs.git ~/dotfiles
cd ~/dotfilesReplace the contents of ~/dotfiles/nixos/hardware-configuration.nix file with the one generated for your system, usually located at /etc/nixos/hardware-configuration.nix.
sudo nixos-rebuild switch --flake .#nixoshome-manager switch --flake .#rahulThank you ❤️

