<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://emil.hemdal.se/feed.xml" rel="self" type="application/atom+xml" /><link href="https://emil.hemdal.se/" rel="alternate" type="text/html" /><updated>2026-04-11T10:05:07+02:00</updated><id>https://emil.hemdal.se/feed.xml</id><title type="html">Emil Hemdal</title><subtitle>My website, covering tech, life, and everything inbetween.</subtitle><entry><title type="html">Fix VSCode and Signal (and other Electron Apps) Password Store on Sway on NixOS</title><link href="https://emil.hemdal.se/sway/nixos/electron/signal/vscode/2026/04/11/fixing-vscode-and-signal-password-store-sway-nix.html" rel="alternate" type="text/html" title="Fix VSCode and Signal (and other Electron Apps) Password Store on Sway on NixOS" /><published>2026-04-11T09:30:00+02:00</published><updated>2026-04-11T09:30:00+02:00</updated><id>https://emil.hemdal.se/sway/nixos/electron/signal/vscode/2026/04/11/fixing-vscode-and-signal-password-store-sway-nix</id><content type="html" xml:base="https://emil.hemdal.se/sway/nixos/electron/signal/vscode/2026/04/11/fixing-vscode-and-signal-password-store-sway-nix.html"><![CDATA[<p>Apps occasionally need to store secrets on the system. Most applications correctly find the key/secret/password store on the system. Electron apps seem to be the exception…</p>

<p>I’ve not really needed VSCode to store secrets until now.</p>

<p>I’ve had the same issue on Signal but I just patched together a desktop file in <code class="language-plaintext highlighter-rouge">/home/USERNAME/.local/share/applications</code> like the following:</p>

<blockquote>
  <p>Note that I have put signal on the user packages below (replace <code class="language-plaintext highlighter-rouge">USERNAME</code> with your username (or if you’re using system packages <code class="language-plaintext highlighter-rouge">/run/current-system/sw/bin/signal-desktop</code>))</p>
</blockquote>

<pre><code class="language-desktop">[Desktop Entry]
Type=Application
Name=Signal Gnome Libsecret
Terminal=false
Exec=/etc/profiles/per-user/USERNAME/bin/signal-desktop --password-store=gnome-libsecret
Icon=/etc/profiles/per-user/USERNAME/share/icons/hicolor/512x512/apps/signal-desktop.png
</code></pre>

<p>I could do the same with VSCode, but since I always launch it from the terminal like <code class="language-plaintext highlighter-rouge">code .</code>, the desktop file is not invoked leading to it not picking up the <code class="language-plaintext highlighter-rouge">--password-store</code> option.</p>

<p>So, digging a little into Nix I came up with the following solution that worked well for me.</p>

<blockquote>
  <p>Here I assume that you have <code class="language-plaintext highlighter-rouge">gnome-keyring</code> working already.</p>
</blockquote>

<p>My abbreviated <code class="language-plaintext highlighter-rouge">/etc/nixos/configuration.nix</code>:</p>
<div class="language-nix highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  <span class="nv">users</span><span class="o">.</span><span class="nv">users</span><span class="o">.</span><span class="nv">USERNAME</span> <span class="o">=</span> <span class="p">{</span>
    <span class="nv">packages</span> <span class="o">=</span> <span class="kn">with</span> <span class="nv">pkgs</span><span class="p">;</span> <span class="p">[</span>
      <span class="p">(</span><span class="nv">symlinkJoin</span> <span class="p">{</span>
        <span class="nv">name</span> <span class="o">=</span> <span class="s2">"signal-desktop"</span><span class="p">;</span>
        <span class="nv">paths</span> <span class="o">=</span> <span class="p">[</span> <span class="nv">signal-desktop</span> <span class="p">];</span>
        <span class="nv">nativeBuildInputs</span> <span class="o">=</span> <span class="p">[</span> <span class="nv">makeWrapper</span> <span class="p">];</span>
        <span class="nv">postBuild</span> <span class="o">=</span> <span class="s2">''</span><span class="err">
</span><span class="s2">          wrapProgram $out/bin/signal-desktop \</span><span class="err">
</span><span class="s2">            --add-flags "--password-store=gnome-libsecret"</span><span class="err">
</span><span class="s2">        ''</span><span class="p">;</span>
      <span class="p">})</span>
      <span class="p">(</span><span class="nv">symlinkJoin</span> <span class="p">{</span>
        <span class="c"># Note: here I use `vscode-fhs`, you can use `vscode` instead</span>
        <span class="nv">name</span> <span class="o">=</span> <span class="s2">"vscode-fhs"</span><span class="p">;</span>
        <span class="nv">paths</span> <span class="o">=</span> <span class="p">[</span> <span class="nv">vscode-fhs</span> <span class="p">];</span>
        <span class="nv">nativeBuildInputs</span> <span class="o">=</span> <span class="p">[</span> <span class="nv">makeWrapper</span> <span class="p">];</span>
        <span class="nv">postBuild</span> <span class="o">=</span> <span class="s2">''</span><span class="err">
</span><span class="s2">          wrapProgram $out/bin/code \</span><span class="err">
</span><span class="s2">            --add-flags "--password-store=gnome-libsecret"</span><span class="err">
</span><span class="s2">        ''</span><span class="p">;</span>
      <span class="p">})</span>
    <span class="p">];</span>
  <span class="p">};</span>
</code></pre></div></div>

<h2 id="metadata">Metadata</h2>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sway --version
sway version 1.11
</code></pre></div></div>

<p><code class="language-plaintext highlighter-rouge">NixOS 25.11</code></p>]]></content><author><name></name></author><category term="sway" /><category term="nixos" /><category term="electron" /><category term="signal" /><category term="vscode" /><summary type="html"><![CDATA[Apps occasionally need to store secrets on the system. Most applications correctly find the key/secret/password store on the system. Electron apps seem to be the exception…]]></summary></entry><entry><title type="html">Fix Missing Cursors in Sway on NixOS</title><link href="https://emil.hemdal.se/sway/nixos/2025/07/19/fixing-missing-cursors-sway-nix.html" rel="alternate" type="text/html" title="Fix Missing Cursors in Sway on NixOS" /><published>2025-07-19T21:00:00+02:00</published><updated>2025-07-19T21:00:00+02:00</updated><id>https://emil.hemdal.se/sway/nixos/2025/07/19/fixing-missing-cursors-sway-nix</id><content type="html" xml:base="https://emil.hemdal.se/sway/nixos/2025/07/19/fixing-missing-cursors-sway-nix.html"><![CDATA[<blockquote>
  <p>Sorry, not the editor Cursor…</p>
</blockquote>

<p>When I moved from <a href="https://www.gnome.org/">GNOME Desktop</a> to <a href="https://swaywm.org/">Sway</a> on my NixOS machine I noticed that my cursor was missing in <a href="https://librewolf.net/">LibreWolf</a> (Firefox with more privacy). This wasn’t an issue on GNOME, which I previously used.</p>

<p>I searched the internet a little, but didn’t find anything covering Sway, NixOS and missing cursors.</p>

<p>I tested which cursors were missing using <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/cursor">MDN CSS Cursor</a> and realized that a lot of them were missing.</p>

<p>I like the default cursors on GNOME, so I found out that they were called <code class="language-plaintext highlighter-rouge">Adwaita</code>.</p>

<h2 id="solution">Solution</h2>

<p>To ensure that those cursors were available I added the following to my nix configuration.</p>

<div class="language-nix highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  <span class="nv">programs</span><span class="o">.</span><span class="nv">sway</span> <span class="o">=</span> <span class="p">{</span>
    <span class="nv">enable</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>
    <span class="nv">wrapperFeatures</span><span class="o">.</span><span class="nv">gtk</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>
    <span class="nv">extraPackages</span> <span class="o">=</span> <span class="kn">with</span> <span class="nv">pkgs</span><span class="p">;</span> <span class="p">[</span>
      <span class="nv">adwaita-icon-theme</span>
      <span class="c"># I have more packages here, but I omitted them for brevity</span>
    <span class="p">];</span>
  <span class="p">};</span>
</code></pre></div></div>

<p>Then I configured sway using</p>
<pre><code class="language-sway">seat seat0 xcursor_theme Adwaita 24
</code></pre>

<p>After reloading sway (or signing out and then in again) the issue was solved.</p>

<h2 id="metadata">Metadata</h2>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sway --version
sway version 1.10.1
</code></pre></div></div>

<p><code class="language-plaintext highlighter-rouge">NixOS 25.05</code></p>]]></content><author><name></name></author><category term="sway" /><category term="nixos" /><summary type="html"><![CDATA[Sorry, not the editor Cursor…]]></summary></entry></feed>