<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>ilovelinux</title>
    <link>https://ilovelinux.dev/</link>
    <description>Recent content on ilovelinux</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 03 Sep 2026 02:30:00 +0200</lastBuildDate>
    <atom:link href="https://ilovelinux.dev/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Install non-PWA websites in PWAsForFirefox with Home Manager</title>
      <link>https://ilovelinux.dev/posts/install-non-pwa-websites-in-pwasforfirefox-with-home-manager/</link>
      <pubDate>Thu, 03 Sep 2026 02:30:00 +0200</pubDate>
      <guid>https://ilovelinux.dev/posts/install-non-pwa-websites-in-pwasforfirefox-with-home-manager/</guid>
      <description>A workaround for declaring non-PWA websites, or PWAs with invalid manifests, in PWAsForFirefox (also known as FirefoxPWA) with Home Manager</description>
      <content:encoded><![CDATA[<h1 id="for-home-manager-2611-unstable-as-now">For Home Manager 26.11 (<code>unstable</code> as now)</h1>
<p>Thanks to <a href="https://github.com/nix-community/home-manager/pull/9898">https://github.com/nix-community/home-manager/pull/9898</a>, <code>manifestUrl</code> is now optional. Omit it for non-PWA websites. &#x1f604;</p>
<p>The rationale of the implementation is based on <a href="https://github.com/nix-community/home-manager/issues/9818">https://github.com/nix-community/home-manager/issues/9818</a> and on this article!</p>
<h1 id="for-home-manager-2605-and-older">For Home Manager 26.05 and older</h1>

    <div class="admonition tip">
      <div class="admonition-header"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M272 384c9.6-31.9 29.5-59.1 49.2-86.2c0 0 0 0 0 0c5.2-7.1 10.4-14.2 15.4-21.4c19.8-28.5 31.4-63 31.4-100.3C368 78.8 289.2 0 192 0S16 78.8 16 176c0 37.3 11.6 71.9 31.4 100.3c5 7.2 10.2 14.3 15.4 21.4c0 0 0 0 0 0c19.8 27.1 39.7 54.4 49.2 86.2l160 0zM192 512c44.2 0 80-35.8 80-80l0-16-160 0 0 16c0 44.2 35.8 80 80 80zM112 176c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-61.9 50.1-112 112-112c8.8 0 16 7.2 16 16s-7.2 16-16 16c-44.2 0-80 35.8-80 80z"/></svg>
        <span>Tip</span>
      </div>
      <div class="admonition-content">
        <p>TL;DR: use <code>data:application/manifest+json;base64,e30=</code> as manifest URL and configure the PWA through <a href="https://home-manager.dev/manual/26.05/options.xhtml#opt-programs.firefoxpwa.profiles._name_.sites._name_.settings"><code>programs.firefoxpwa.profiles.&lt;name&gt;.sites.&lt;name&gt;.settings</code></a>. Rationale below. &#x1f604;</p>
      </div>
    </div><h2 id="introduction">Introduction</h2>
<p><a href="https://pwasforfirefox.filips.si/">PWAsForFirefox</a>, also known as FirefoxPWA, added support for non-PWA websites in v0.4.0<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup><sup id="fnref:2"><a href="#fn:2" class="footnote-ref" role="doc-noteref">2</a></sup> to give users the flexibility to install any website as a PWA. The same mechanism covers <a href="https://pwasforfirefox.filips.si/resources/specific-website-tips/#websites-with-invalid-manifests">PWAs with invalid manifests</a> (<a href="https://github.com/filips123/PWAsForFirefox/blob/6bd124618df89fca8ba382baa77ad235ee6beed0/docs/docs/resources/specific-website-tips.md#websites-with-invalid-manifests">permalink</a>): unticking &ldquo;Use manifest&rdquo; makes the extension generate a fake one instead.</p>
<p>I started using <a href="https://home-manager.dev/manual/26.05/options.xhtml#opt-programs.firefoxpwa.enable"><code>programs.firefoxpwa</code></a> with standard PWAs. Then I wanted to install LinkedIn as a PWA.</p>
<p><strong>LinkedIn, however, doesn&rsquo;t have a PWA.</strong></p>
<h2 id="how-support-for-non-pwa-websites-works">How support for non-PWA websites works</h2>
<p>When a non-PWA website is installed, the extension:</p>
<ol>
<li><a href="https://github.com/filips123/PWAsForFirefox/blob/6bd124618df89fca8ba382baa77ad235ee6beed0/extension/src/sites/install.js#L369-L380">Generates a &ldquo;fake&rdquo; manifest</a> with four fields:
<ul>
<li><strong>start_url</strong></li>
<li><strong>name</strong></li>
<li><strong>description</strong></li>
<li><strong>icons</strong></li>
</ul>
</li>
<li>Encodes the JSON as base64.</li>
<li>Creates a data URL: <code>data:application/manifest+json;base64,&lt;GENERATED_MANIFEST_JSON_BASE64&gt;</code>.</li>
<li><strong>Uses the created <code>data:</code> URL as the manifest URL.</strong></li>
</ol>
<p>So the non-PWA website now has a PWA manifest.</p>
<h2 id="configure-a-non-pwa-website-using-the-home-manager-options">Configure a non-PWA website using the Home Manager options</h2>
<p>Normally, we would set <a href="https://home-manager.dev/manual/26.05/options.xhtml#opt-programs.firefoxpwa.profiles._name_.sites._name_.manifestUrl"><code>programs.firefoxpwa.profiles.&lt;name&gt;.sites.&lt;name&gt;.manifestUrl</code></a> to the manifest&rsquo;s URL. However, non-PWA websites don&rsquo;t have a manifest, and the module doesn&rsquo;t document what to use instead.</p>
<p>We just saw how PWAsForFirefox builds a manifest, but Home Manager takes a different path: it writes the config file itself, so none of those four fields are read<sup id="fnref:3"><a href="#fn:3" class="footnote-ref" role="doc-noteref">3</a></sup>.</p>

    <div class="admonition tip">
      <div class="admonition-header"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M272 384c9.6-31.9 29.5-59.1 49.2-86.2c0 0 0 0 0 0c5.2-7.1 10.4-14.2 15.4-21.4c19.8-28.5 31.4-63 31.4-100.3C368 78.8 289.2 0 192 0S16 78.8 16 176c0 37.3 11.6 71.9 31.4 100.3c5 7.2 10.2 14.3 15.4 21.4c0 0 0 0 0 0c19.8 27.1 39.7 54.4 49.2 86.2l160 0zM192 512c44.2 0 80-35.8 80-80l0-16-160 0 0 16c0 44.2 35.8 80 80 80zM112 176c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-61.9 50.1-112 112-112c8.8 0 16 7.2 16 16s-7.2 16-16 16c-44.2 0-80 35.8-80 80z"/></svg>
        <span>Tip</span>
      </div>
      <div class="admonition-content">
        <p>Although the manifest values are ignored, you can configure the PWA through
<a href="https://home-manager.dev/manual/26.05/options.xhtml#opt-programs.firefoxpwa.profiles._name_.sites._name_.settings"><code>programs.firefoxpwa.profiles.&lt;name&gt;.sites.&lt;name&gt;.settings</code></a>.</p>
<p>For example, to set an icon for your PWA, you can use:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-nix" data-lang="nix"><span class="line"><span class="cl"><span class="n">settings</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">icon_url</span> <span class="o">=</span> <span class="s2">&#34;https://www.linkedin.com/favicon.ico&#34;</span><span class="p">;</span>
</span></span></code></pre></td></tr></table>
</div>
</div><p>This also applies to valid PWAs.</p>
      </div>
    </div><p>Since the manifest is ignored, we can use a data URL containing an empty JSON object encoded in base64. &#x1f604;</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-console" data-lang="console"><span class="line"><span class="cl"><span class="gp">$</span> <span class="nb">echo</span> -n <span class="s1">&#39;{}&#39;</span> <span class="p">|</span> base64
</span></span><span class="line"><span class="cl"><span class="go">e30=
</span></span></span></code></pre></td></tr></table>
</div>
</div><p>So the resulting URL is:</p>
<pre tabindex="0"><code>data:application/manifest+json;base64,e30=
</code></pre><p>Now set that as your <code>manifestUrl</code>:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-nix" data-lang="nix"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="n">programs</span><span class="o">.</span><span class="n">firefoxpwa</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="n">enable</span> <span class="o">=</span> <span class="no">true</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">    <span class="n">profiles</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">      <span class="s2">&#34;XXXXXXXXXXXXXXXXXXXXXXXXXX&#34;</span><span class="o">.</span><span class="n">sites</span><span class="o">.</span><span class="s2">&#34;YYYYYYYYYYYYYYYYYYYYYYYYYY&#34;</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">        <span class="n">name</span> <span class="o">=</span> <span class="s2">&#34;LinkedIn&#34;</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">        <span class="n">url</span> <span class="o">=</span> <span class="s2">&#34;https://www.linkedin.com/&#34;</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">        <span class="n">manifestUrl</span> <span class="o">=</span> <span class="s2">&#34;data:application/manifest+json;base64,e30=&#34;</span><span class="p">;</span> <span class="c1"># &lt;-- Our generated &#34;manifest&#34; URL.</span>
</span></span><span class="line"><span class="cl">      <span class="p">};</span>
</span></span><span class="line"><span class="cl">    <span class="p">};</span>
</span></span><span class="line"><span class="cl">  <span class="p">};</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span></code></pre></td></tr></table>
</div>
</div>
    <div class="admonition tip">
      <div class="admonition-header"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M272 384c9.6-31.9 29.5-59.1 49.2-86.2c0 0 0 0 0 0c5.2-7.1 10.4-14.2 15.4-21.4c19.8-28.5 31.4-63 31.4-100.3C368 78.8 289.2 0 192 0S16 78.8 16 176c0 37.3 11.6 71.9 31.4 100.3c5 7.2 10.2 14.3 15.4 21.4c0 0 0 0 0 0c19.8 27.1 39.7 54.4 49.2 86.2l160 0zM192 512c44.2 0 80-35.8 80-80l0-16-160 0 0 16c0 44.2 35.8 80 80 80zM112 176c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-61.9 50.1-112 112-112c8.8 0 16 7.2 16 16s-7.2 16-16 16c-44.2 0-80 35.8-80 80z"/></svg>
        <span>Tip</span>
      </div>
      <div class="admonition-content">
        <p><code>XXX…</code> and <code>YYY…</code> are ULIDs identifying the profile and the website.</p>
<p>You can generate them with any ULID generator, for example <a href="https://ulidgenerator.com/">https://ulidgenerator.com/</a>.</p>
      </div>
    </div><p>Rebuild and enjoy your non-PWA website installed as a PWA! &#x1f604;</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p><a href="https://github.com/filips123/PWAsForFirefox/releases/tag/v0.4.0">https://github.com/filips123/PWAsForFirefox/releases/tag/v0.4.0</a>&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:2">
<p><a href="https://github.com/filips123/PWAsForFirefox/commit/a20123b98155b640fd35d026be16184f8c9c5434">https://github.com/filips123/PWAsForFirefox/commit/a20123b98155b640fd35d026be16184f8c9c5434</a>&#160;<a href="#fnref:2" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:3">
<p><a href="https://github.com/nix-community/home-manager/blob/d9d750e4fc11c10cab2da677bdd31e427f3a3a71/modules/programs/firefoxpwa.nix#L165-L177">https://github.com/nix-community/home-manager/blob/d9d750e4fc11c10cab2da677bdd31e427f3a3a71/modules/programs/firefoxpwa.nix#L165-L177</a>&#160;<a href="#fnref:3" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded>
    </item>
    <item>
      <title>🐍🇪🇺 Leverage pytest&#39;s Fixture to write focused and highly decoupled tests @ EuroPython 2026</title>
      <link>https://ilovelinux.dev/talks/europython-2026-leverage-pytest-s-fixtures-to-write-focused-and-highly-decoupled-tests/</link>
      <pubDate>Thu, 16 Jul 2026 14:30:00 +0200</pubDate>
      <guid>https://ilovelinux.dev/talks/europython-2026-leverage-pytest-s-fixtures-to-write-focused-and-highly-decoupled-tests/</guid>
      <description>30 minutes talk, for beginners</description>
      <content:encoded><![CDATA[<p><a href="./slides.pdf"><strong>Slides here!</strong></a><sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup></p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p><a href="https://ep2026.europython.eu/session/leverage-pytest-s-fixture-to-write-focused-and-highly-decoupled-tests">https://ep2026.europython.eu/session/leverage-pytest-s-fixture-to-write-focused-and-highly-decoupled-tests</a>&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded>
    </item>
    <item>
      <title>🐍🇮🇹 Walking through PEP 810: Lazy Imports @ PyCon Italia 2026</title>
      <link>https://ilovelinux.dev/talks/pycon-italia-2026-walking-through-pep-810-lazy-imports/</link>
      <pubDate>Fri, 29 May 2026 15:45:00 +0200</pubDate>
      <guid>https://ilovelinux.dev/talks/pycon-italia-2026-walking-through-pep-810-lazy-imports/</guid>
      <description>30 minutes talk, for beginners</description>
      <content:encoded><![CDATA[<p><a href="./slides.pdf"><strong>Slides here!</strong></a><sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup></p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p><a href="https://2026.pycon.it/en/event/walking-through-pep-810-lazy-imports">https://2026.pycon.it/en/event/walking-through-pep-810-lazy-imports</a>&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded>
    </item>
    <item>
      <title>Welcome!</title>
      <link>https://ilovelinux.dev/posts/welcome/</link>
      <pubDate>Sat, 23 May 2026 18:30:00 +0200</pubDate>
      <guid>https://ilovelinux.dev/posts/welcome/</guid>
      <description>&lt;p&gt;This blog has been created, it may be populated or I may give up and leave it empty :D&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>This blog has been created, it may be populated or I may give up and leave it empty :D</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
