</span><span></span><spanstyle=color:#ffb964>environment</span><span>.</span><spanstyle=color:#ffb964>systemPackages </span><span>= with </span><spanstyle=color:#ffb964>pkgs</span><span>; [
</span><span></span><spanstyle=color:#ffb964>zola </span><spanstyle=color:#888># Append the package name to the list
</span><span> ];
</span><span></span><spanstyle=color:#888># ...
</span><span>}
</span></code></pre><ul><li>As a user package (with home-manager):</ul><preclass=language-nixdata-lang=nixstyle=background:#151515;color:#e8e8d3><codeclass=language-nixdata-lang=nix><span>{ </span><spanstyle=color:#ffb964>pkgs</span><span>, ... }: {
</span><span></span><spanstyle=color:#888># ...
</span><span></span><spanstyle=color:#ffb964>home</span><span>.</span><spanstyle=color:#ffb964>packages </span><span>= with </span><spanstyle=color:#ffb964>pkgs</span><span>; [
</span><span></span><spanstyle=color:#ffb964>zola </span><spanstyle=color:#888># Append the package name to the list
</span><span> ];
</span><span></span><spanstyle=color:#888># ...
</span><span>}
</span></code></pre><p>Now that <code>zola</code> itself is installed, we can move on setting up the pages it serves - continue reading...<h2id=setting-up-a-theme>Setting up a theme<aaria-label="Anchor link for: setting-up-a-theme"class=zola-anchorhref=#setting-up-a-theme>#</a></h2><p>Zola actually has a section of its website showcasing several community-made themes which you can choose from to be the theme for your static site <arel="nofollow noreferrer"href=https://getzola.org/themes/>here</a>.<p>Simply choose a theme that you like (demos are usually available for each theme listed) and follow its appropriate documentation to set it up - this site uses a version of the <arel="nofollow noreferrer"href=https://www.getzola.org/themes/serene/>serene theme</a> with my custom colours.<blockquoteclass="callout note"><divclass=icon><svgviewbox="0 0 24 24"height=20width=20xmlns=http://www.w3.org/2000/svg><pathd="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 7H13V9H11V7ZM11 11H13V17H11V11Z"fill=currentColor></path></svg></div><divclass=content><p><strong>Custom themes</strong><p>You can also make your own theme if that better suits you (I recommend giving the <arel="nofollow noreferrer"href=https://getzola.org/documentation>documentation</a> a read if so).</div></blockquote><h2id=setting-up-nginx>Setting up NGINX<aaria-label="Anchor link for: setting-up-nginx"class=zola-anchorhref=#setting-up-nginx>#</a></h2><p>After selecting a theme (or making your own) you should now have a directory somewhere on your server containing your static site. For the following snippet, we'll assume this is at <code>/var/lib/blog</code>.<p><arel="nofollow noreferrer"href=https://nginx.com>NGINX</a> is a popular webserver which we're going to use for the purposes of hosting and serving our site. To do so, append the following somewhere in your configuration:<preclass=language-nixdata-lang=nixstyle=background:#151515;color:#e8e8d3><codeclass=language-nixdata-lang=nix><spanstyle=color:#888># ...
</span><span></span><spanstyle=color:#ffb964>serverName </span><span>= </span><spanstyle=color:#99ad6a>"blog.devraza.duckdns.org"</span><span>; </span><spanstyle=color:#888># replace this with wherever your site will be
</span><span></span><spanstyle=color:#ffb964>root </span><span>= </span><spanstyle=color:#99ad6a>"/var/lib/blog/public"</span><span>; </span><spanstyle=color:#888># the path to the `public` folder in our site directory