<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>StuckInVim</title>
    <subtitle>Notes from a terminal-centric homelab.</subtitle>
    <link rel="self" type="application/atom+xml" href="https://stuckinvim.io/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://stuckinvim.io"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-10-30T00:00:00+00:00</updated>
    <id>https://stuckinvim.io/atom.xml</id>
    <entry xml:lang="en">
        <title>Deploying this site with Nix + Zola</title>
        <published>2026-10-30T00:00:00+00:00</published>
        <updated>2026-10-30T00:00:00+00:00</updated>
        
        <author>
          <name>stuck in vim</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://stuckinvim.io/posts/deploying-with-nix-zola/"/>
        <id>https://stuckinvim.io/posts/deploying-with-nix-zola/</id>
        
        <content type="html" xml:base="https://stuckinvim.io/posts/deploying-with-nix-zola/">&lt;p&gt;This site is built by Zola inside a Nix derivation and served by Caddy on a Linode VPS.&lt;/p&gt;
&lt;h2 id=&quot;Why_Zola?&quot;&gt;Why Zola?&lt;/h2&gt;
&lt;p&gt;Zola is a single static binary. It needs no runtime dependencies beyond the HTML it produces.&lt;/p&gt;
&lt;h2 id=&quot;A_sample_table&quot;&gt;A sample table&lt;/h2&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Tool&lt;/th&gt;&lt;th&gt;Role&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Zola&lt;/td&gt;&lt;td&gt;Static site generator&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Nix&lt;/td&gt;&lt;td&gt;Reproducible build&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Caddy&lt;/td&gt;&lt;td&gt;HTTPS + file server&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2 id=&quot;A_sample_code_block&quot;&gt;A sample code block&lt;/h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #181524;&quot; &gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #BAC2DE;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #F5C2E7;&quot;&gt; pkgs&lt;/span&gt;&lt;span style=&quot;color: #89DCEB;&quot;&gt;, ...&lt;/span&gt;&lt;span style=&quot;color: #BAC2DE;&quot;&gt; }:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F5C2E7;&quot;&gt;pkgs&lt;/span&gt;&lt;span style=&quot;color: #89DCEB;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #F5C2E7;&quot;&gt;stdenvNoCC&lt;/span&gt;&lt;span style=&quot;color: #89DCEB;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #F5C2E7;&quot;&gt;mkDerivation&lt;/span&gt;&lt;span style=&quot;color: #BAC2DE;&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #EBA0AC;&quot;&gt;  name&lt;/span&gt;&lt;span style=&quot;color: #89DCEB;&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color: #BAC2DE;&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt;stuckinvim-site&lt;/span&gt;&lt;span style=&quot;color: #BAC2DE;&quot;&gt;&amp;quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #EBA0AC;&quot;&gt;  src&lt;/span&gt;&lt;span style=&quot;color: #89DCEB;&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; ./.&lt;/span&gt;&lt;span style=&quot;color: #BAC2DE;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #EBA0AC;&quot;&gt;  nativeBuildInputs&lt;/span&gt;&lt;span style=&quot;color: #89DCEB;&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color: #BAC2DE;&quot;&gt; [&lt;/span&gt;&lt;span style=&quot;color: #F5C2E7;&quot;&gt; pkgs&lt;/span&gt;&lt;span style=&quot;color: #89DCEB;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #F5C2E7;&quot;&gt;zola&lt;/span&gt;&lt;span style=&quot;color: #BAC2DE;&quot;&gt; ];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #EBA0AC;&quot;&gt;  buildPhase&lt;/span&gt;&lt;span style=&quot;color: #89DCEB;&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color: #BAC2DE;&quot;&gt; &amp;#39;&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt;    zola build --root $src --base-url https://stuckinvim.io&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #BAC2DE;&quot;&gt;  &amp;#39;&amp;#39;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #EBA0AC;&quot;&gt;  installPhase&lt;/span&gt;&lt;span style=&quot;color: #89DCEB;&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color: #BAC2DE;&quot;&gt; &amp;#39;&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt;    cp -r public $out&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #BAC2DE;&quot;&gt;  &amp;#39;&amp;#39;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #BAC2DE;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&quot;A_blockquote&quot;&gt;A blockquote&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;The best build is the one that finishes the same way every time.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That is the point of pinning the source and the builder in one Nix flake.&lt;/p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Recovering from a bad NixOS rollback</title>
        <published>2026-10-15T00:00:00+00:00</published>
        <updated>2026-10-15T00:00:00+00:00</updated>
        
        <author>
          <name>stuck in vim</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://stuckinvim.io/posts/recovering-from-rollback/"/>
        <id>https://stuckinvim.io/posts/recovering-from-rollback/</id>
        
        <content type="html" xml:base="https://stuckinvim.io/posts/recovering-from-rollback/">&lt;p&gt;Sometimes the previous generation is not the one you want.&lt;/p&gt;
&lt;h2 id=&quot;List_available_generations&quot;&gt;List available generations&lt;/h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #181524;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;&quot;&gt;nixos-rebuild&lt;/span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; list-generations&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Pick the generation number you trust, then switch to it.&lt;/p&gt;
&lt;h2 id=&quot;Switch_to_a_specific_generation&quot;&gt;Switch to a specific generation&lt;/h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #181524;&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; nixos-rebuild switch&lt;/span&gt;&lt;span style=&quot;color: #F2CDCD;&quot;&gt; --generation&lt;/span&gt;&lt;span style=&quot;color: #FAB387;&quot;&gt; 42&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&quot;A_table_of_common_rescue_paths&quot;&gt;A table of common rescue paths&lt;/h2&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Problem&lt;/th&gt;&lt;th&gt;Quick path&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Bad kernel&lt;/td&gt;&lt;td&gt;Boot an older generation from the bootloader&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Broken service&lt;/td&gt;&lt;td&gt;&lt;code&gt;systemctl stop unit&lt;/code&gt; then rollback&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Lost secrets&lt;/td&gt;&lt;td&gt;Restore from SOPS backups before activation&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2 id=&quot;Remember&quot;&gt;Remember&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;Rollbacks are only easy if you keep generations.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Set a reasonable &lt;code&gt;configurationLimit&lt;/code&gt; on &lt;code&gt;boot.loader.systemd-boot&lt;/code&gt; or GRUB so you do not erase your escape hatch.&lt;/p&gt;
</content>
        
    </entry>
</feed>
