<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title></title>
    <link rel="self" type="application/atom+xml" href="https://ilanjoselevich.com/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://ilanjoselevich.com"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2022-08-02T00:00:00+00:00</updated>
    <id>https://ilanjoselevich.com/atom.xml</id>
    <entry xml:lang="en">
        <title>Using SSH Resident Keys With a YubiKey 5</title>
        <published>2022-08-02T00:00:00+00:00</published>
        <updated>2022-08-02T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ilanjoselevich.com/blog/using-ssh-resident-keys-with-a-yubikey-5/"/>
        <id>https://ilanjoselevich.com/blog/using-ssh-resident-keys-with-a-yubikey-5/</id>
        
        <content type="html" xml:base="https://ilanjoselevich.com/blog/using-ssh-resident-keys-with-a-yubikey-5/">&lt;h3 id=&quot;initial-checks&quot;&gt;Initial checks&lt;&#x2F;h3&gt;
&lt;p&gt;Start by checking that there aren&#x27;t any previous ssh keys inside the FIDO2 authenticator of your YubiKey. You can check if they exist by running the command below:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;nix&lt;&#x2F;span&gt;&lt;span&gt; shell nixpkgs#yubikey-manager -c ykman fido credentials list
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If the command above outputs a string mentioning &amp;quot;ssh&amp;quot; or &amp;quot;openssh&amp;quot;, then you have already got a key generated and store on your YubiKey.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;evaluating-additional-authentication-factors&quot;&gt;Evaluating additional authentication factors&lt;&#x2F;h3&gt;
&lt;p&gt;Before generating a new ssh key to store on your YubiKey you must consider which additional required authentication factors you want to use. Below you can see a table with the available factors and their corresponding command:&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Factors&lt;&#x2F;th&gt;&lt;th&gt;Description&lt;&#x2F;th&gt;&lt;th&gt;Command&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;No PIN or touch are required&lt;&#x2F;td&gt;&lt;td&gt;You will not be required to enter your FIDO2 PIN or touch your YubiKey each time to authenticate&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;ssh-keygen -t ed25519-sk -O resident -O no-touch-required&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;PIN but no touch required&lt;&#x2F;td&gt;&lt;td&gt;Entering the PIN will be required but touching the physical key will not&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;ssh-keygen -t ed25519-sk -O resident -O verify-required -O no-touch-required&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;No PIN but touch is required&lt;&#x2F;td&gt;&lt;td&gt;You will only need to touch the YubiKey to authenticate&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;ssh-keygen -t ed25519-sk -O resident&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;A PIN and a touch are required (&lt;strong&gt;most secure&lt;&#x2F;strong&gt;)&lt;&#x2F;td&gt;&lt;td&gt;This is the most secure option, it requires both the PIN and touching to be used&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;ssh-keygen -t ed25519-sk -O resident -O verify-required&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h3 id=&quot;generating-the-key&quot;&gt;Generating the key&lt;&#x2F;h3&gt;
&lt;p&gt;Once you&#x27;ve decided which option fits best for your threat model you will need to run one of the commands above. Note that if using a PIN you don&#x27;t need to add an additional ssh passphrase as it&#x27;s redundant due to the FIDO2 PIN being used instead. I personally went with the last and most secure option so the command I used to generate the key was:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;ssh-keygen&lt;&#x2F;span&gt;&lt;span&gt; -t ed25519-sk -O resident -O verify-required
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;adding-the-new-keys&quot;&gt;Adding the new keys&lt;&#x2F;h3&gt;
&lt;p&gt;Now that you have generated a key which you can use, you will need to add it to your current ssh-agent session. You can do that by first starting the agent like so:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;eval &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;ssh-agent&lt;&#x2F;span&gt;&lt;span&gt; -s&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;)&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Then add the key on the YubiKey with the command below:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;ssh-add&lt;&#x2F;span&gt;&lt;span&gt; -K
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You can verify that the key was added by listing all the keys available in the current ssh-agent session:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;ssh-add&lt;&#x2F;span&gt;&lt;span&gt; -l
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;We just added our brand new ssh key temporarily to our current session. If you would like to have it permanently available on the system you can run the command:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;ssh-keygen&lt;&#x2F;span&gt;&lt;span&gt; -K
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This retrieves our ssh key from our YubiKey and puts the private (still protected by YubiKey) and public key in the current working directory. You must now rename them accordingly to &lt;code&gt;id_ed25519_sk&lt;&#x2F;code&gt; and &lt;code&gt;id_ed25519_sk.pub&lt;&#x2F;code&gt; and place them in your &lt;code&gt;~&#x2F;.ssh&lt;&#x2F;code&gt; directory so ssh can detect them.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;authenticating-with-github&quot;&gt;Authenticating with GitHub&lt;&#x2F;h3&gt;
&lt;p&gt;In order to authenticate with GitHub you will have to add your new public key to your GitHub profile over at -&amp;gt; &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;settings&#x2F;keys&quot;&gt;github.com&#x2F;settings&#x2F;keys&lt;&#x2F;a&gt;. You can retrieve the keypair by running&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;ssh-keygen&lt;&#x2F;span&gt;&lt;span&gt; -K
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;and copy the public key directly from the newly added files to the current folder, for example, &lt;code&gt;id_ed25519_sk_rk.pub&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;testing-authentication&quot;&gt;Testing authentication&lt;&#x2F;h4&gt;
&lt;p&gt;Now that we&#x27;ve added our ssh key to GitHub we can test that the setup works correctly by running:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;ssh&lt;&#x2F;span&gt;&lt;span&gt; -T git@github.com
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If this worked correctly you should be greeted by a &amp;quot;welcoming message&amp;quot;.&lt;&#x2F;p&gt;
&lt;p&gt;NOTE: In order to make sure that you are using the new SSH key consider moving out existing keys from the &lt;code&gt;~&#x2F;.ssh&lt;&#x2F;code&gt; directory just for this test.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Building websites using Nix Flakes and Zola</title>
        <published>2021-11-19T00:00:00+00:00</published>
        <updated>2021-11-19T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ilanjoselevich.com/blog/building-websites-using-nix-flakes-and-zola/"/>
        <id>https://ilanjoselevich.com/blog/building-websites-using-nix-flakes-and-zola/</id>
        
        <content type="html" xml:base="https://ilanjoselevich.com/blog/building-websites-using-nix-flakes-and-zola/">&lt;h3 id=&quot;a-quick-first-blog-post-introduction&quot;&gt;A quick first blog post introduction&lt;&#x2F;h3&gt;
&lt;p&gt;Welcome! This is my new and only website, where I will share my finest thoughts and ideas.&lt;br &#x2F;&gt;
I have been procrastinating for a while about creating my own blog, but here it is! 🎉&lt;&#x2F;p&gt;
&lt;h4 id=&quot;i-think-it-will-only-make-sense-if-i-start-by-showing-how-i-actually-build-this-website&quot;&gt;I think it will only make sense if I start by showing how I &lt;em&gt;actually&lt;&#x2F;em&gt; build this website.&lt;&#x2F;h4&gt;
&lt;h3 id=&quot;nix&quot;&gt;Nix&lt;&#x2F;h3&gt;
&lt;p&gt;Nix is an extremely powerful tool, which I use all the time as a DevOps enthusiast. I mostly use Nix for building software and for managing my machines running NixOS; it&#x27;s a GNU&#x2F;Linux distribution that was made with Nix at it&#x27;s core. It uses Nix to manage all of its system configuration. &lt;em&gt;I don&#x27;t want the focus of this post to be about NixOS, so if you are interested in knowing more about NixOS, you can read more about it &lt;a href=&quot;https:&#x2F;&#x2F;nixos.org&#x2F;manual&#x2F;nixos&#x2F;stable&quot;&gt;here&lt;&#x2F;a&gt;.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;For building this website, we make use of a new experimental feature in Nix called &lt;strong&gt;Flakes&lt;&#x2F;strong&gt;, whose main attraction for me is that it is pure and reproducible by default. Flakes are great because they&#x27;re a standardized way to structure Nix-based projects. If you would like to learn more about Flakes, these are my go-to resources:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Tweag&#x27;s three-part series blog post - &lt;a href=&quot;https:&#x2F;&#x2F;www.tweag.io&#x2F;blog&#x2F;2020-05-25-flakes&quot;&gt;1 - Introduction and tutorial&lt;&#x2F;a&gt;, &lt;a href=&quot;https:&#x2F;&#x2F;www.tweag.io&#x2F;blog&#x2F;2020-06-25-eval-cache&quot;&gt;2 - Evaluation caching&lt;&#x2F;a&gt;, &lt;a href=&quot;https:&#x2F;&#x2F;www.tweag.io&#x2F;blog&#x2F;2020-07-31-nixos-flakes&quot;&gt;3 - NixOS systems management&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Eelco Dolstra&#x27;s talk at NixCon 2019 - &lt;a href=&quot;https:&#x2F;&#x2F;youtu.be&#x2F;UeBX7Ide5a0&quot;&gt;Nix flakes (NixCon 2019)&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Flakes&#x27; NixOS wiki page - &lt;a href=&quot;https:&#x2F;&#x2F;nixos.wiki&#x2F;wiki&#x2F;Flakes&quot;&gt;nixos.wiki&#x2F;wiki&#x2F;flakes&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;zola-and-static-site-generators&quot;&gt;Zola and static site generators&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;My experience with SSGs is so little that you should probably take everything I say about them with a grain (bucket) of salt.&lt;&#x2F;strong&gt;&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;My journey with SSGs started with Hugo. I have played around with Hugo to create a couple of fairly small sites for the sake of testing. I did not like some complexity of Hugo, like the many ways of managing &amp;quot;themes&amp;quot; and Go&#x27;s HTML and text templating, so I started looking for new solution. I wanted something lightweight and minimal, so I can focus more on the actual content of the site; that&#x27;s where Zola came into the picture. I read a bit about Zola and liked some of its features, like built-in syntax highlighting and Sass compilation, alongside that it has a nice command line interface and is also a single binary like Hugo, though with Hugo, if one decides to use Hugo &amp;quot;modules&amp;quot;, they will also need to have Go installed.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;writing-the-flake-nix&quot;&gt;Writing the flake.nix&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;The nixpkgs input:&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
When starting to write a flake for a new project that takes use of &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;NixOS&#x2F;nixpkgs&quot;&gt;nixpkgs&lt;&#x2F;a&gt;, one should consider if they care about it using the latest software updates from the &amp;quot;unstable&amp;quot; branch or use the more thoroughly tested software updates from the &amp;quot;stable&amp;quot; branch. I personally avoid using the &amp;quot;master&amp;quot; branch since the changes in it haven&#x27;t gone through the &lt;a href=&quot;https:&#x2F;&#x2F;hydra.nixos.org&quot;&gt;Hydra&lt;&#x2F;a&gt; build system, so you wouldn&#x27;t be able to use the provided binary cache, which means you&#x27;d have to compile&#x2F;build the software on your local system. We can set the branch to use for nixpkgs by declaring the &lt;code&gt;nixpkgs&lt;&#x2F;code&gt; input in &lt;code&gt;flake.nix&lt;&#x2F;code&gt; like so:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;nix&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-nix &quot;&gt;&lt;code class=&quot;language-nix&quot; data-lang=&quot;nix&quot;&gt;&lt;span&gt;inputs&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;url &lt;&#x2F;span&gt;&lt;span style=&quot;background-color:#bf616a;color:#d8dee9;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;github:nixos&#x2F;nixpkgs&#x2F;nixpkgs-unstable&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;background-color:#bf616a;color:#d8dee9;&quot;&gt;;&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;In the example above we declared to use the &lt;code&gt;nixpkgs-unstable&lt;&#x2F;code&gt; branch. You can read about the available branches&#x2F;channels here → &lt;a href=&quot;https:&#x2F;&#x2F;nixos.wiki&#x2F;wiki&#x2F;Nix_channels&quot;&gt;nixos.wiki&#x2F;wiki&#x2F;nix_channels&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;The flake-utils input:&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
In this flake we will also be using &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;numtide&#x2F;flake-utils&quot;&gt;flake-utils&lt;&#x2F;a&gt;, which is a collection of pure Nix functions that don&#x27;t depend on nixpkgs. They can be useful for writing other Nix flakes. We use one of its system related functions, &lt;code&gt;eachDefaultSystem&lt;&#x2F;code&gt; in this case. All this function does is populate the outputs with a list of all systems nixpkgs builds for. This is a simple and clean way to make a flake output buildable for many system types and architectures. It makes sense to use it here because, fortunately, Zola on nixpkgs builds for all the system types.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;The outputs:&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
Let&#x27;s take a look at the outputs used in this flake:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;nix&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-nix &quot;&gt;&lt;code class=&quot;language-nix&quot; data-lang=&quot;nix&quot;&gt;&lt;span&gt;{
&lt;&#x2F;span&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;packages&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;website &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;pkgs&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;stdenv&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;mkDerivation &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;rec &lt;&#x2F;span&gt;&lt;span&gt;{
&lt;&#x2F;span&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;pname &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;static-website&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;version &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;2021-11-19&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;src &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;.&#x2F;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;nativeBuildInputs &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;[ pkgs&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;zola ]&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;buildPhase &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;zola build&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;installPhase &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;cp -r public $out&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;defaultPackage &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;self&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;packages&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#d8dee9;&quot;&gt;${system}&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;website&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;devShell &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;pkgs&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;mkShell {
&lt;&#x2F;span&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;packages &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= with &lt;&#x2F;span&gt;&lt;span&gt;pkgs; [
&lt;&#x2F;span&gt;&lt;span&gt;      zola
&lt;&#x2F;span&gt;&lt;span&gt;    ]&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;}
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Starting with the &lt;code&gt;packages.website&lt;&#x2F;code&gt; output, this output builds a package called &lt;code&gt;website&lt;&#x2F;code&gt;. This package includes a derivation called &lt;code&gt;${pname}-${version}&lt;&#x2F;code&gt;, which in this case will just be &lt;code&gt;static-website-2021-11-19&lt;&#x2F;code&gt;. This derivation&#x27;s &lt;code&gt;src&lt;&#x2F;code&gt; is the current directory, &lt;code&gt;.&#x2F;.&lt;&#x2F;code&gt; and it depends on the package &lt;code&gt;pkgs.zola&lt;&#x2F;code&gt;. Nix derivations are built using phases. The build phase here runs the command &lt;code&gt;zola build&lt;&#x2F;code&gt;, and the install phase runs the command &lt;code&gt;cp -r public $out&lt;&#x2F;code&gt;.
The end result will be that it builds the Zola site in the current directory and puts its generated contents in the &lt;code&gt;$out&lt;&#x2F;code&gt; directory, which by default is a symlink called &lt;code&gt;result&lt;&#x2F;code&gt; that&#x27;s linked to the Nix store.&lt;&#x2F;p&gt;
&lt;p&gt;Now onto the &lt;code&gt;defaultPackage&lt;&#x2F;code&gt; output, this output is pretty simple. All it does is set the default output to get when running &lt;code&gt;nix build&lt;&#x2F;code&gt; to the output called &lt;code&gt;packages.website&lt;&#x2F;code&gt; that we just went over.&lt;&#x2F;p&gt;
&lt;p&gt;And finally, the &lt;code&gt;devShell&lt;&#x2F;code&gt; output, this is the output you will use to develop your website. What this output does is create a new shell environment with the package &lt;code&gt;pkgs.zola&lt;&#x2F;code&gt; inside it. In order to enter that shell you have to run &lt;code&gt;nix develop&lt;&#x2F;code&gt; in the root of the flake&#x2F;repo.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-complete-flake-nix-recipe&quot;&gt;The complete flake.nix recipe&lt;&#x2F;h3&gt;
&lt;p&gt;This is the complete flake.nix for the explanation we went over above.
You are more than welcome to use it for your own site.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;nix&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-nix &quot;&gt;&lt;code class=&quot;language-nix&quot; data-lang=&quot;nix&quot;&gt;&lt;span&gt;{
&lt;&#x2F;span&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;description &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;A flake for developing and building my personal website&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;url &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;github:nixos&#x2F;nixpkgs&#x2F;nixpkgs-unstable&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;flake-utils&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;url &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;github:numtide&#x2F;flake-utils&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;outputs &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;{ self&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;flake-utils }:
&lt;&#x2F;span&gt;&lt;span&gt;    flake-utils&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;lib&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;eachDefaultSystem (system:
&lt;&#x2F;span&gt;&lt;span&gt;      &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;let
&lt;&#x2F;span&gt;&lt;span&gt;        &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;pkgs &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;legacyPackages&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#d8dee9;&quot;&gt;${system}&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;      &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;in
&lt;&#x2F;span&gt;&lt;span&gt;      {
&lt;&#x2F;span&gt;&lt;span&gt;        &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;packages&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;website &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;pkgs&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;stdenv&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;mkDerivation &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;rec &lt;&#x2F;span&gt;&lt;span&gt;{
&lt;&#x2F;span&gt;&lt;span&gt;          &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;pname &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;static-website&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;          &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;version &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;2021-11-19&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;          &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;src &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;.&#x2F;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;          &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;nativeBuildInputs &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;[ pkgs&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;zola ]&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;          &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;buildPhase &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;zola build&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;          &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;installPhase &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;cp -r public $out&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;        &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;defaultPackage &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;self&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;packages&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#d8dee9;&quot;&gt;${system}&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;website&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;        &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;devShell &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;pkgs&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;mkShell {
&lt;&#x2F;span&gt;&lt;span&gt;          &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;packages &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= with &lt;&#x2F;span&gt;&lt;span&gt;pkgs; [
&lt;&#x2F;span&gt;&lt;span&gt;            zola
&lt;&#x2F;span&gt;&lt;span&gt;          ]&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;      }
&lt;&#x2F;span&gt;&lt;span&gt;    )&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;}
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;but-there-is-more-declarative-zola-themes-management&quot;&gt;But there is more! - Declarative Zola themes management&lt;&#x2F;h3&gt;
&lt;p&gt;If you want to go &lt;strong&gt;overkill&lt;&#x2F;strong&gt; you can even manage your Zola themes declaratively as flake inputs. This is a bit more hacky than you might think. What we are doing here is actually adding another &lt;code&gt;src&lt;&#x2F;code&gt; of some sort into the build sandbox, in the configuration phase, right before the build phase. One of the things people always try to achieve when writing Nix code is making it as modular as possible. I tried to get it as modular as possible by writing a variable with the value of the theme name that is specified inside the theme&#x27;s &lt;code&gt;theme.toml&lt;&#x2F;code&gt;. It was done by squashing together a couple of &lt;em&gt;fancy&lt;&#x2F;em&gt; built-in functions, &lt;code&gt;builtins.fromTOML&lt;&#x2F;code&gt; and &lt;code&gt;builtins.readFile&lt;&#x2F;code&gt;. These functions convert the TOML file into a Nix file and then grab the value of &lt;code&gt;name&lt;&#x2F;code&gt; inside.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;nix&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-nix &quot;&gt;&lt;code class=&quot;language-nix&quot; data-lang=&quot;nix&quot;&gt;&lt;span&gt;themeName &lt;&#x2F;span&gt;&lt;span style=&quot;background-color:#bf616a;color:#d8dee9;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; ((&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;builtins.&lt;&#x2F;span&gt;&lt;span&gt;fromTOML (&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;builtins.&lt;&#x2F;span&gt;&lt;span&gt;readFile &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#a3be8c;&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#d8dee9;&quot;&gt;deepthought&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#a3be8c;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&#x2F;theme.toml&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;))&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;name)&lt;&#x2F;span&gt;&lt;span style=&quot;background-color:#bf616a;color:#d8dee9;&quot;&gt;;&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;In the configuration phase, we create a directory (two actually, if you consider the parent one) that is named after the value of &lt;code&gt;${themeName}&lt;&#x2F;code&gt;, which we set before. Now a simple &lt;code&gt;cp -r&lt;&#x2F;code&gt; to copy the contents of the &lt;code&gt;deepthought&lt;&#x2F;code&gt; (the theme used in this case) flake input. This will make the theme available in the &lt;code&gt;sourceRoot&lt;&#x2F;code&gt;. For making development easier, we can add a shell hook to the &lt;code&gt;mkShell&lt;&#x2F;code&gt; , which will symlink the content of the theme&#x27;s input to &lt;code&gt;themes&#x2F;${themeName}&lt;&#x2F;code&gt; so we can use &lt;code&gt;zola serve&lt;&#x2F;code&gt; as normal.&lt;&#x2F;p&gt;
&lt;p&gt;The finished and only &lt;em&gt;slightly&lt;&#x2F;em&gt; &lt;strong&gt;overkill&lt;&#x2F;strong&gt; &lt;code&gt;flake.nix&lt;&#x2F;code&gt; is available below, and &lt;em&gt;anyone&lt;&#x2F;em&gt; is free to use it.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;nix&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-nix &quot;&gt;&lt;code class=&quot;language-nix&quot; data-lang=&quot;nix&quot;&gt;&lt;span&gt;{
&lt;&#x2F;span&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;description &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;A flake for developing and building my personal website&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;url &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;github:nixos&#x2F;nixpkgs&#x2F;nixpkgs-unstable&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;flake-utils&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;url &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;github:numtide&#x2F;flake-utils&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;deepthought &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;{ &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;url &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;github:RatanShreshtha&#x2F;DeepThought&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;flake &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= false&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;; &lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;outputs &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;{ self&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;flake-utils&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;deepthought }:
&lt;&#x2F;span&gt;&lt;span&gt;    flake-utils&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;lib&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;eachDefaultSystem (system:
&lt;&#x2F;span&gt;&lt;span&gt;      &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;let
&lt;&#x2F;span&gt;&lt;span&gt;        &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;pkgs &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;legacyPackages&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#d8dee9;&quot;&gt;${system}&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;        &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;themeName &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;((&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;builtins.&lt;&#x2F;span&gt;&lt;span&gt;fromTOML (&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;builtins.&lt;&#x2F;span&gt;&lt;span&gt;readFile &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#a3be8c;&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#d8dee9;&quot;&gt;deepthought&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#a3be8c;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&#x2F;theme.toml&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;))&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;name)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;      &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;in
&lt;&#x2F;span&gt;&lt;span&gt;      {
&lt;&#x2F;span&gt;&lt;span&gt;        &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;packages&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;website &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;pkgs&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;stdenv&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;mkDerivation &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;rec &lt;&#x2F;span&gt;&lt;span&gt;{
&lt;&#x2F;span&gt;&lt;span&gt;          &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;pname &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;static-website&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;          &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;version &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;2021-11-19&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;          &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;src &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;.&#x2F;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;          &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;nativeBuildInputs &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;[ pkgs&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;zola ]&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;          &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;configurePhase &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;&amp;#39;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;            mkdir -p &amp;quot;themes&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#a3be8c;&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#d8dee9;&quot;&gt;themeName&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#a3be8c;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;            cp -r &lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#a3be8c;&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#d8dee9;&quot;&gt;deepthought&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#a3be8c;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&#x2F;* &amp;quot;themes&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#a3be8c;&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#d8dee9;&quot;&gt;themeName&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#a3be8c;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;          &amp;#39;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;          &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;buildPhase &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;zola build&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;          &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;installPhase &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;cp -r public $out&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;        &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;defaultPackage &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;self&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;packages&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#d8dee9;&quot;&gt;${system}&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;website&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;        &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;devShell &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;pkgs&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;mkShell {
&lt;&#x2F;span&gt;&lt;span&gt;          &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;packages &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;[ pkgs&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;zola ]&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;          &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;shellHook &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;&amp;#39;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;            mkdir -p themes
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;            ln -sn &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#a3be8c;&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#d8dee9;&quot;&gt;deepthought&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#a3be8c;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot; &amp;quot;themes&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#a3be8c;&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#d8dee9;&quot;&gt;themeName&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#a3be8c;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;          &amp;#39;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;      }
&lt;&#x2F;span&gt;&lt;span&gt;    )&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;;
&lt;&#x2F;span&gt;&lt;span&gt;}
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;And that&#x27;s about it, thanks for reading my first ever blog post!&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
</feed>
