A NixOS configuration for the Raspberry Pi 4, featuring a custom setup for wireless networking, Docker, Hyprland, and more.
-
Ensure you have Nix installed on your system. You can follow the official Nix installation instructions.
-
Clone the NixOS configuration repository:
git clone https://github.com/pabl-o-ce/nixos-pi.git
- Navigate to the cloned repository directory:
cd nixos-pi
Note: Make sure you have write permissions for the microSD card and that you specify the correct device path to avoid data loss.
- Add variables in the
hosts/pi/default.nix
:
# Define variables
let
user = "user";
hashedPassword = "$y$j9T$S6GQmMWVSaLC9akC6aPcd1$3HV1XwIjUAR18ZwEriXXw3MRu/PUHld7lAFRsY1R.KA";
SSID = "example";
SSIDpassword = "example";
interface = "wlan0";
hostname = "example";
ip = "10.0.0.4";
ipGateway = "10.0.0.1";
dns1 = ["1.1.1.3" "1.0.0.3"];
tcpPort = [22 53 80 443];
udpPort = [53];
- Build and activate the NixOS configuration using flakes:
sudo nixos-rebuild switch --flake .#pi