Set up Nix
Platforms
My Nix config works on a variety of platforms. Follow the respective guides for obtaining those if you haven’t already. It is recommended to install Home Manager on any of the listed operating systems.
Install NixOS for the most integrated experience.
Install Nix-on-Droid for an experimental terminal experience on Android. This provides integrated support for Home Manager, which therefore doesn’t need to be installed separately.
Install Home Manager for user configurations in any Nix environment. This is required for most of the functionality of my Nix config.
Use the Determinate Nix Installer (recommended) or the default installer for non-NixOS systems, such as Linux distributions, MacOS or WSL.
Enable flakes
My Nix config heavily relies on Nix flakes to provide most of its features. These aren’t enabled by default on most Nix environments, so it’s recommended but not required to set them up before proceding.
nix.settings.experimental-features = [ "nix-command" "flakes" ];Nix-on-Droid has built-in experimental flakes support. No action is required.
nix.settings.experimental-features = [ "nix-command" "flakes" ];If using Determinate Nix, this is not required.
experimental-features = nix-command flakesClone the Git repository
My Nix config uses Git to keep track of versions. Clone the repository into an accessible location.
Fetch the Git repository.
Terminal window git clone https://codeberg.org/bricked/nix-configTerminal window nix flake clone codeberg:bricked/nix-config --dest nix-configTerminal window nix --experimental-features 'nix-command flakes' flake clone codeberg:bricked/nix-config --dest nix-configEnter the cloned repository for all future instructions.
Terminal window cd nix-config