My configuration files.
This repository contains configuration files for my systems, written largely in Nix.
A Nix installation with flakes support is required.
# Install Nix if not installed
$ sh <(curl -L https://nixos.org/nix/install) # Linux/Mac
$ sh <(curl -L https://nixos.org/nix/install) --daemon # WSL
# Setup Nix flakes support
$ mkdir -p ~/.config/nix
$ echo "experimental-features = nix-command flakes" > ~/.config/nix/nix.conf
# Clone the repository.
$ git clone https://github.com/bnjmnt4n/system.git
$ cd system
# Use local development shell
$ nix develop
$ swn # Switch to the new NixOS/nix-darwin configuration.
$ swh # Switch to the new home configuration.
# Update dependencies.
$ nix flake update
# Alternative commands:
# Switching NixOS configuration:
$ sudo nixos-rebuild switch --flake '.#$HOSTNAME'
# Switching nix-darwin configuration:
$ nix build '.#darwinConfigurations.$HOSTNAME_$USER.system'
$ ./result/sw/bin/darwin-rebuild switch --flake . '.#$HOSTNAME'
# Switching home-manager configuration:
$ nix build '.#homeConfigurations.$HOSTNAME_$USERNAME.activationPackage'
$ ./result/activate
MacOS:
Windows:
I've gotten inspiration, and in some cases drawn liberally from the following places: