Skip to content

theobori/nixos-configuration

Repository files navigation

My NixOS Configuration

check pages

built with nix

This GitHub repository contains all the Nix declarations I use to build my systems. It is a Nix Flake based on Snowfall Lib.

Getting Started

Before diving in, ensure that you have Nix installed on your system. If not, you can download and install it from the official Nix website or from the Determinate Systems installer.

Clone this repository to your local machine

You can clone the git repository then build and use the system with the following command lines.

git clone https://github.com/theobori/nixos-configuration.git
cd nixos-configuration

# linux
sudo nixos-rebuild switch --flake .

 # with direnv
flake switch

Deploy on a remote machine

Feel free to use my minimal bootable disk image x86_64-install-iso/minimal. The aim is to load this bootable iso on a target machine to have a usable OpenSSH server to deploy our NixOS configuration.

You can build it with the following command.

nix build .#install-isoConfigurations.minimal

Once built, you'll find an iso file in the iso folder of the build result. Below, part of the result of the tree result command shows us that we have built an image for a x86_64-linux system.

result/
├── iso
│   └── nixos-24.11.20241028.bb50fc7-x86_64-linux.iso
...

Once loaded on the target machine, you can use a deployment tool such as nixos-anywhere to deploy NixOS over SSH.

Here's an example.

nix run github:nix-community/nixos-anywhere -- --generate-hardware-config nixos-generate-config systems/x86_64-linux/vm/hardware-configuration.nix nixos@<destination> --flake .#<system-name>

Screenshots

My NixOS KDE Plasma 6 environment looks like this.

desktop emacs-coding emacs_launcher

Resources

Other configurations from where I learned and copied: