Chirpy is a static website generator that uses modern web technologies like React and TypeScript. It is built with simplicity in mind, making it easy to use even for beginners. In this tutorial, we are going to learn how to install Chirpy on NixOS Latest.
Before we start, make sure you have the following prerequisites:
If you haven't installed Nix, do so by running the following command:
curl -L https://nixos.org/nix/install | sh
This command will download and execute the Nix installer script.
We need Git to clone the Chirpy repository. Run the following command to install Git:
nix-env -i git
We will clone the Chirpy repository into our machine. Navigate to a directory where you want to store the repository, then run the following commands:
git clone https://github.com/cotes2020/chirpy.git
cd chirpy
Chirpy has some dependencies that we need to install. We will use Nix to install them. Run the following command:
nix-shell -p nodejs yarn -I nixpkgs=channel:nixos-21.05
This will open a Nix shell with Node.js and Yarn installed, along with all the dependencies required by Chirpy.
Now that we have all the dependencies installed, we can build the website. Run the following command:
yarn build
This will build the Chirpy website and generate a static version of it in the public
directory.
To serve the website, run the following command:
yarn serve
This will start a local server at http://localhost:8080 where you can view the Chirpy website.
Congratulations! You have successfully installed Chirpy on NixOS Latest. Now you can create your website using the modern web technologies that Chirpy provides.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!