<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Nix on Wimpy's World</title><link>https://blog.wimpys.world/tags/nix/</link><description>Recent content in Nix on Wimpy's World</description><generator>Hugo -- gohugo.io</generator><language>en-gb</language><managingEditor>martin@wimpress.com (Martin Wimpress)</managingEditor><webMaster>martin@wimpress.com (Martin Wimpress)</webMaster><lastBuildDate>Thu, 15 May 2025 13:37:42 +0100</lastBuildDate><atom:link href="https://blog.wimpys.world/tags/nix/rss.xml" rel="self" type="application/rss+xml"/><item><title>Nothing but Nix</title><link>https://blog.wimpys.world/posts/nothing-but-nix-github-actions/</link><pubDate>Thu, 15 May 2025 13:37:42 +0100</pubDate><author>martin@wimpress.com (Martin Wimpress)</author><guid>https://wimpysworld.com/posts/nothing-but-nix-github-actions/</guid><description>&lt;p&gt;Have you ever tried to build a complex &lt;a href="https://nixos.org/"&gt;NixOS&lt;/a&gt; ️❄️ configuration in GitHub Actions only to be greeted by the dreaded &lt;em&gt;&amp;ldquo;no space left on device&amp;rdquo;&lt;/em&gt; error? I certainly have, and it&amp;rsquo;s been driving me bonkers for quite some time! 😖&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories"&gt;Standard GitHub Actions runners&lt;/a&gt; come with a paltry ~20GB of free disk space, or so it would seem. Which sounds decent until you try to build sophisticated NixOS or &lt;a href="https://nix-community.github.io/home-manager/"&gt;Home Manager&lt;/a&gt; configurations. A comprehensive workstation or home lab server setup can consume 10-15GB due to all the included packages and dependencies, leaving precious little headroom for anything else 🤏&lt;/p&gt;
&lt;p&gt;This space limitation effectively meant I couldn&amp;rsquo;t build my full workstation and server configurations in CI. So annoying! 😠 I wanted my CI to cache complete builds to &lt;a href="https://flakehub.com/"&gt;FlakeHub Cache&lt;/a&gt;, but was forever stuck with only partial builds or individual packages that wouldn&amp;rsquo;t properly test the complete configurations. This meant that each configuration change on my workstations and servers required frustrating additional compilation time for things like 3rd party kernel modules, &lt;a href="https://ollama.com/"&gt;Ollama&lt;/a&gt;, custom package overrides, and more - all because I couldn&amp;rsquo;t get full builds cached through CI ️🥺&lt;/p&gt;
&lt;p&gt;Well, I&amp;rsquo;d had enough of that nonsense and decided to solve the problem once and for all 🧠&lt;/p&gt;
&lt;h2 id="introducing-nothing-but-nix-"&gt;Introducing &lt;em&gt;Nothing but Nix&lt;/em&gt; ️❄️&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;m chuffed to bits to announce &lt;a href="https://github.com/marketplace/actions/nothing-but-nix"&gt;&lt;em&gt;Nothing but Nix&lt;/em&gt;&lt;/a&gt;, a GitHub Action that &lt;strong&gt;brutally reclaims&lt;/strong&gt; disk space 🪓 on runners and transforms them into Nix powerhouses!&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s what it does in a nutshell:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- &lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;actions/checkout@v4&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- &lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;wimpysworld/nothing-but-nix@main&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- &lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;DeterminateSystems/determinate-nix-action@main&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- &lt;span class="nt"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; nix flake check&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The result? Instead of ~20GB for your &lt;a href="https://zero-to-nix.com/concepts/nix-store/"&gt;Nix store&lt;/a&gt;, you get &lt;strong&gt;65GB to 130GB&lt;/strong&gt; of sweet, glorious Nix-dedicated space. That&amp;rsquo;s enough to build even the chonkiest of configurations! 🪨&lt;/p&gt;
&lt;h2 id="space-the-final-frontier-"&gt;Space, the Final Frontier 🌌&lt;/h2&gt;
&lt;p&gt;Working at &lt;a href="https://determinate.systems"&gt;Determinate Systems&lt;/a&gt;, I get to see firsthand how powerful Nix can be when properly cached. Our &lt;a href="https://flakehub.com"&gt;FlakeHub Cache&lt;/a&gt; makes system updates lightning fast ⚡ but I couldn&amp;rsquo;t fully leverage it in CI because my builds kept running out of space.&lt;/p&gt;
&lt;p&gt;I wanted to be able to &lt;strong&gt;build and test all my configurations&lt;/strong&gt; in CI:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;💁 &lt;strong&gt;Servers:&lt;/strong&gt; media services, local LLMs, website, fediverse services, distributed storage, backup&lt;/li&gt;
&lt;li&gt;️🖥️ &lt;strong&gt;Workstations:&lt;/strong&gt; dual GPU, loaded with dev tools, content creation apps and local LLMs&lt;/li&gt;
&lt;li&gt;💻 &lt;strong&gt;Laptops:&lt;/strong&gt; optimized for travel, media on the go, presentations and development&lt;/li&gt;
&lt;li&gt;👻 &lt;strong&gt;VMs:&lt;/strong&gt; for &lt;a href="https://ubuntu-mate.org"&gt;Linux desktop development&lt;/a&gt; and testing&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But GitHub&amp;rsquo;s ~20GB limitation kept getting in the way 🙅 Sure, I could have paid GitHub for their larger runners with more disk space, but being both cheap and stubborn, I wasn&amp;rsquo;t having any of that! 💸❌ Instead, I started thinking, &lt;em&gt;&amp;ldquo;Hang on a minute, those free runners must have more space somewhere - I just need to find it and claim it!&amp;rdquo;&lt;/em&gt; 🤔💭&lt;/p&gt;
&lt;p&gt;After digging through the runner specs and file system layout, I discovered that &lt;strong&gt;GitHub Actions runners have a large chunk of free space on the &lt;code&gt;/mnt&lt;/code&gt; filesystem that&amp;rsquo;s barely used&lt;/strong&gt; 🤯 There was also the possibility to reclaim significant space by purging pre-installed software that Nix users don&amp;rsquo;t need anyway 😈&lt;/p&gt;
&lt;h2 id="the-slightly-mad-science-bit-"&gt;The Slightly Mad Science Bit ‍🧑‍🔬&lt;/h2&gt;
&lt;p&gt;At its core, &lt;em&gt;Nothing but Nix&lt;/em&gt; uses a two-pronged attack:&lt;/p&gt;
&lt;h3 id="1-the-initial-slash-instant-volume-creation"&gt;1. The Initial Slash: Instant Volume Creation&lt;/h3&gt;
&lt;p&gt;First, the action creates a large loop device from free space on &lt;code&gt;/mnt&lt;/code&gt; and sets up a properly tuned BTRFS filesystem:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Create a large disk image in the free space&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;free_space&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;df -m --output&lt;span class="o"&gt;=&lt;/span&gt;avail /mnt &lt;span class="p"&gt;|&lt;/span&gt; tail -n &lt;span class="m"&gt;1&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; tr -d &lt;span class="s1"&gt;&amp;#39; &amp;#39;&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;loop_dev&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;sudo losetup --find&lt;span class="k"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo fallocate -l &lt;span class="k"&gt;$((&lt;/span&gt;free_space &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="m"&gt;1024&lt;/span&gt;&lt;span class="k"&gt;))&lt;/span&gt;M &lt;span class="s2"&gt;&amp;#34;/mnt/disk0.img&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo losetup &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;loop_dev&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;/mnt/disk0.img&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Set up an optimized BTRFS filesystem&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo mkfs.btrfs -L nix -d raid0 -m raid0 --nodiscard &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;loop_dev&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo mount &lt;span class="nv"&gt;LABEL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;nix /nix -o noatime,nobarrier,nodiscard,compress&lt;span class="o"&gt;=&lt;/span&gt;zstd:1,space_cache&lt;span class="o"&gt;=&lt;/span&gt;v2,commit&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;120&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;This immediately provides around 65GB of Nix-ready space before your workflow even gets going!&lt;/strong&gt; 💪
I could have stopped here, but did I mention beging stubborn yet? 🫏&lt;/p&gt;
&lt;h3 id="2-the-background-purge-merciless-space-reclamation"&gt;2. The Background Purge: Merciless Space Reclamation&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;While your workflow continues&lt;/strong&gt;, &lt;em&gt;Nothing but Nix&lt;/em&gt; starts a background process to ruthlessly eliminate unnecessary software:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Docker images? Gone! 🗑️&lt;/li&gt;
&lt;li&gt;Language runtimes? Obliterated! 💥&lt;/li&gt;
&lt;li&gt;Package managers? Annihilated! 💣&lt;/li&gt;
&lt;li&gt;Documentation? Vaporized! 🔥&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As space is reclaimed, it creates a second disk image on the root file system and adds it to the BTRFS pool, &lt;strong&gt;dynamically growing your Nix volume up to around 130GB.&lt;/strong&gt; 🚀&lt;/p&gt;
&lt;p&gt;The file system purge is powered by &lt;code&gt;rmz&lt;/code&gt; (from the &lt;a href="https://github.com/SUPERCILEX/fuc"&gt;Fast Unix Commands (FUC)&lt;/a&gt; project) - a high-performance alternative to &lt;code&gt;rm&lt;/code&gt; that makes deletion blazingly fast. &lt;strong&gt;Using traditional &lt;code&gt;rm&lt;/code&gt; a full file system purge took ~11 minutes ⏳😞 &lt;code&gt;rmz&lt;/code&gt; cut that to under 60 seconds!&lt;/strong&gt; ️⏱️😀&lt;/p&gt;
&lt;h3 id="btrfs-with-nodiscard"&gt;BTRFS with &lt;code&gt;nodiscard&lt;/code&gt;?&lt;/h3&gt;
&lt;p&gt;I&amp;rsquo;m using &lt;a href="https://btrfs.readthedocs.io/en/latest/"&gt;BTRFS&lt;/a&gt; for the volume because it:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Supports dynamic device addition&lt;/li&gt;
&lt;li&gt;Has built-in compression to save even more space&lt;/li&gt;
&lt;li&gt;Allows optimal space utilization with RAID0 layout&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The &lt;strong&gt;&lt;code&gt;nodiscard&lt;/code&gt; mount option is absolutely essential&lt;/strong&gt; because we&amp;rsquo;re using loop devices backed by &lt;a href="https://en.wikipedia.org/wiki/Sparse_file"&gt;sparse files&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Without it, BTRFS would try to issue &lt;a href="https://btrfs.readthedocs.io/en/latest/Trim.html"&gt;TRIM/discard&lt;/a&gt; commands that cause allocation size to be misreported when using loop devices. This misreporting would result in inaccurate space accounting. The &lt;code&gt;nodiscard&lt;/code&gt; option ensures the filesystem maintains an accurate picture of its available storage.&lt;/p&gt;
&lt;h2 id="choose-your-weapon-the-hatchet-protocol-"&gt;Choose Your Weapon: The Hatchet Protocol 🪓&lt;/h2&gt;
&lt;p&gt;Not everyone needs the same level of space reclamation, so I&amp;rsquo;ve added different &lt;em&gt;&amp;ldquo;Hatchet Protocol&amp;rdquo;&lt;/em&gt; levels to control how aggressive the action is:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- &lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;wimpysworld/nothing-but-nix@main&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;hatchet-protocol&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;cleave&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# Options: holster, carve, cleave (default), rampage&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Protocol&lt;/th&gt;
&lt;th&gt;&lt;code&gt;/nix&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Holster&lt;/td&gt;
&lt;td&gt;~65GB&lt;/td&gt;
&lt;td&gt;Keep the hatchet sheathed, use space from &lt;code&gt;/mnt&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Carve&lt;/td&gt;
&lt;td&gt;~85GB&lt;/td&gt;
&lt;td&gt;Craft and combine free space from &lt;code&gt;/&lt;/code&gt; and &lt;code&gt;/mnt&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cleave&lt;/td&gt;
&lt;td&gt;~115GB&lt;/td&gt;
&lt;td&gt;Make decisive cuts to large packages&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rampage&lt;/td&gt;
&lt;td&gt;~130GB&lt;/td&gt;
&lt;td&gt;Relentless elimination of all bloat&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;I recommend &lt;strong&gt;Cleave&lt;/strong&gt; for most users, which is the default setting. It strikes a good balance between reclaiming space and keeping some useful tools around. But if you&amp;rsquo;re a proper Nix enthusiast who believes that &lt;code&gt;#nix-is-life&lt;/code&gt;, the Rampage protocol will squeeze out every last byte of space for your Nix store ️️❄️&lt;/p&gt;
&lt;h2 id="from-frustration-to-freedom-"&gt;From Frustration to Freedom ️🕊️&lt;/h2&gt;
&lt;p&gt;Since implementing &lt;em&gt;Nothing but Nix&lt;/em&gt;, I&amp;rsquo;ve been able to build &lt;strong&gt;all&lt;/strong&gt; my NixOS and Home Manager configurations in CI. This means:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;🔒 Every &lt;code&gt;flake.lock&lt;/code&gt; update is fully tested against my complete configuration set&lt;/li&gt;
&lt;li&gt;✅ All successful builds are cached to FlakeHub Cache&lt;/li&gt;
&lt;li&gt;⚡ System updates are lightning-fast&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This has been an absolute game-changer for my workflow. Now when I apply updates to any of my devices, everything is delivered directly from &lt;code&gt;cache.flakehub.com&lt;/code&gt; with zero local compilation time! 🚀 All packages have been pre-built and verified in CI, meaning updates that would have taken ages to compile (&lt;em&gt;looking at you &lt;code&gt;ollama&lt;/code&gt;&lt;/em&gt; 👀) locally now complete in seconds. It&amp;rsquo;s the difference between waiting for a coffee break and a blink-and-you&amp;rsquo;ll-miss-it experience 🤩&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s what the build times look like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;💁 2x Servers: ~5-10 minutes&lt;/li&gt;
&lt;li&gt;️🖥️ 2x Workstations: ~6-13 minutes&lt;/li&gt;
&lt;li&gt;💻 4x Laptops: ~7-10 minutes&lt;/li&gt;
&lt;li&gt;👻 2x Virutal Manachines: ~4-10 minutes&lt;/li&gt;
&lt;li&gt;📦 59x Local packages: ~5-14 minutes&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="getting-started-with-nothing-but-nix-"&gt;Getting Started with &lt;em&gt;Nothing but Nix&lt;/em&gt; ✨&lt;/h2&gt;
&lt;p&gt;Ready to give it a go? Here&amp;rsquo;s how to use it in your GitHub Actions workflow:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Test Nix Flake&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;pull_request&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;push&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;branches&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;main ]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;tests&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;runs-on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;ubuntu-latest&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;permissions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;id-token&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;write&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;contents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;read&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;actions/checkout@v4 &lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# 👇 Add this before installing Nix&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;wimpysworld/nothing-but-nix@main &lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;DeterminateSystems/determinate-nix-action@main&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; # Now you have 100+ GB for your Nix builds!
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; nix build . -L
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; nix flake check&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For FlakeHub users, make sure you add the &lt;code&gt;permissions&lt;/code&gt; block as shown above. This allows &lt;a href="https://determinate.systems/nix/"&gt;Determinate Nix&lt;/a&gt; to authenticate with FlakeHub and FlakeHub Cache.&lt;/p&gt;
&lt;h2 id="beyond-storage-to-virtual-machines-"&gt;Beyond Storage to Virtual Machines? 🔮&lt;/h2&gt;
&lt;p&gt;Now that I&amp;rsquo;ve proven large volumes can be dynamically constructed in GitHub runners, I&amp;rsquo;m starting to think about what else might be possible. A GitHub action that implements something like &lt;a href="https://github.com/quickemu-project/quickemu"&gt;Quickemu&lt;/a&gt; (&lt;em&gt;another project of mine&lt;/em&gt;), to standup KVM-accelerated VMs inside a GitHub runner is my favourite idea 💡&lt;/p&gt;
&lt;p&gt;GitHub has &lt;a href="https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-host"&gt;recently announced&lt;/a&gt; hardware acceleration for Android virtualization on Linux runners, which means the KVM infrastructure is already there and avilable for open source projects and larger runners 😯 All we need to do is leverage it for our own VMs.&lt;/p&gt;
&lt;p&gt;Imagine being able to run a full VM of your validated build environment inside GitHub Actions! It would be like having a self-hosted runner, but without the self-hosting 😏 And it just so happens that the &lt;a href="https://github.com/DeterminateSystems/determinate-nix-action"&gt;Determinate Nix Action&lt;/a&gt; enables KVM in GitHub runners. Coincidence? 😉&lt;/p&gt;
&lt;h2 id="build-something-massive-"&gt;Build Something Massive ️🏗️&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;Nothing but Nix&lt;/em&gt; removes one of the most frustrating limitations for Nix users in GitHub Actions. No more trimming your configurations to fit into tiny spaces - now you can build and test your full NixOS fleet with confidence 🤓&lt;/p&gt;
&lt;p&gt;Give it a try, and let me know what you think!&lt;/p&gt;
&lt;p&gt;The action is available at:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/wimpysworld/nothing-but-nix"&gt;wimpysworld/nothing-but-nix&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Marketplace: &lt;a href="https://github.com/marketplace/actions/nothing-but-nix"&gt;&lt;em&gt;Nothing but Nix&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you run into any issues or have ideas for improvements, please open an issue on GitHub. And if this tool saves your CI builds, consider giving the repo a star! ⭐&lt;/p&gt;
&lt;p&gt;Happy Nixing! ❄️&lt;/p&gt;</description><summary>The Nix Space Heist: Reclaiming 130GB in GitHub Actions</summary></item><item><title>Fuzzel Colour Picker</title><link>https://blog.wimpys.world/posts/fuzzel-hyprpicker/</link><pubDate>Tue, 15 Apr 2025 13:37:42 +0100</pubDate><author>martin@wimpress.com (Martin Wimpress)</author><guid>https://wimpysworld.com/posts/fuzzel-hyprpicker/</guid><description>&lt;p&gt;We&amp;rsquo;ve all been there - you&amp;rsquo;re knee-deep in customizing your desktop, tweaking configs, perfecting that theme, and suddenly you need to grab a specific colour from somewhere on screen.
If you&amp;rsquo;re like me and recently made the jump to &lt;a href="https://hyprland.org/"&gt;Hyprland&lt;/a&gt; (or other contemporary Wayland compositor), you might have found yourself missing some of those handy X11 utilities that &lt;em&gt;&amp;ldquo;just worked&amp;rdquo;&lt;/em&gt; ️™️&lt;/p&gt;
&lt;h2 id="the-wayland-colour-picker-problem"&gt;The Wayland Colour Picker Problem&lt;/h2&gt;
&lt;p&gt;When I switched my daily driver to Hyprland back in August 2024, I was chuffed with the smooth animations, efficient tiling, and general polish.
But as with any big change, there were a few splinters in my workflow that needed sorting.&lt;/p&gt;
&lt;p&gt;One particular rough edge was the lack of a proper GUI colour picker.
On X11, I&amp;rsquo;d been spoiled by my mate &lt;a href="https://mastodon.social/@sil"&gt;Stuart Langridge&lt;/a&gt;&amp;rsquo;s excellent tool &lt;strong&gt;&lt;a href="https://www.kryogenix.org/code/pick/"&gt;Pick&lt;/a&gt;&lt;/strong&gt; - a proper colour picker that did exactly what it said on the tin.
But in Wayland? Well, I was left running &lt;a href="https://github.com/hyprwm/hyprpicker"&gt;&lt;code&gt;hyprpicker&lt;/code&gt;&lt;/a&gt; from the terminal like some kind of savage! 😅&lt;/p&gt;
&lt;p class="text-center"&gt;
&lt;img src="./hyprpicker.png" class="img-fluid" alt="hyprpicker in the terminal "/&gt;
&lt;br /&gt;
&lt;em&gt;hyprpicker in the terminal&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;Don&amp;rsquo;t get me wrong - &lt;code&gt;hyprpicker&lt;/code&gt; works brilliantly for what it is.
But after seeing how well my recent integrations of &lt;a href="https://github.com/e-tho/bzmenu"&gt;&lt;strong&gt;bzmenu&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://github.com/e-tho/iwmenu"&gt;&lt;strong&gt;iwmenu&lt;/strong&gt;&lt;/a&gt; worked with &lt;a href="https://codeberg.org/dnkl/fuzzel"&gt;Fuzzel&lt;/a&gt;, a lightbulb moment hit me: why not create a proper Fuzzel-based front-end for &lt;code&gt;hyprpicker&lt;/code&gt;? 💡&lt;/p&gt;
&lt;h2 id="birth-of-fuzzel-hyprpicker"&gt;Birth of fuzzel-hyprpicker&lt;/h2&gt;
&lt;p&gt;After my second coffee one morning (the optimal programming fuel ☕💪), I decided to tackle this problem head-on.
If I was going to spend hours staring at my &lt;a href="https://catppuccin.com/"&gt;Catppuccin Mocha&lt;/a&gt; themed desktop, I needed proper tools to maintain it! ‍🐈‍⬛🎨&lt;/p&gt;
&lt;p&gt;The goal was simple:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a Fuzzel-based UI for &lt;code&gt;hyprpicker&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Maintain persistent colour history&lt;/li&gt;
&lt;li&gt;Make it keyboard-friendly&lt;/li&gt;
&lt;li&gt;Automatcially copy selected colours to clipboard&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The result is &lt;a href="https://github.com/wimpysworld/nix-config/blob/main/home-manager/_mixins/desktop/hyprland/fuzzel/fuzzel-hyprpicker.sh"&gt;&lt;code&gt;fuzzel-hyprpicker.sh&lt;/code&gt;&lt;/a&gt; - a little script that brings together the power of &lt;code&gt;hyprpicker&lt;/code&gt; with the elegant UI of Fuzzel.&lt;/p&gt;
&lt;p class="text-center"&gt;
&lt;img src="./fuzzel-hyprpicker.png" class="img-fluid" alt="fuzzel-hyprpicker colour selection menu "/&gt;
&lt;br /&gt;
&lt;em&gt;fuzzel-hyprpicker showing the colour selection menu&lt;/em&gt;
&lt;/p&gt;
&lt;h2 id="how-it-works"&gt;How It Works&lt;/h2&gt;
&lt;p&gt;The magic behind &lt;code&gt;fuzzel-hyprpicker.sh&lt;/code&gt; is surprisingly straightforward.
Let me walk you through the key bits:&lt;/p&gt;
&lt;h3 id="setting-up-the-basics"&gt;Setting Up the Basics&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;#!/usr/bin/env bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# A tool to pick colours from the screen using hyprpicker and fuzzel&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;set&lt;/span&gt; +u &lt;span class="c1"&gt;# Disable nounset&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;APP_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;fuzzel-hyprpicker&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;NOTIFY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;notify-desktop --app-name=&lt;/span&gt;&lt;span class="nv"&gt;$APP_NAME&lt;/span&gt;&lt;span class="s2"&gt; --icon=org.gnome.design.Palette&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Set up the storage directory and file&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;CONFIG_DIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;XDG_CONFIG_HOME&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="p"&gt;/.config&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;$APP_NAME&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;HISTORY_FILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$CONFIG_DIR&lt;/span&gt;&lt;span class="s2"&gt;/colours.txt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;ICONS_DIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$CONFIG_DIR&lt;/span&gt;&lt;span class="s2"&gt;/icons&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Nothing fancy here - we&amp;rsquo;re just setting up our environment, defining where we&amp;rsquo;ll store our colour history, and setting up notifications.
Note that I properly follow the XDG spec here - it&amp;rsquo;s the little things! 😉&lt;/p&gt;
&lt;h3 id="the-clever-bit-svg-icons"&gt;The Clever Bit: SVG Icons&lt;/h3&gt;
&lt;p&gt;Here&amp;rsquo;s where things get interesting.
Fuzzel supports icons in its menus, but I needed a way to show colour swatches.
The solution? Dynamically generated SVG files:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;function&lt;/span&gt; generate_svg_icon&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;local&lt;/span&gt; &lt;span class="nv"&gt;colour&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;local&lt;/span&gt; &lt;span class="nv"&gt;icon_path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$ICONS_DIR&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;$colour&lt;/span&gt;&lt;span class="s2"&gt;.svg&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;# Create an SVG for the colour if it doesn&amp;#39;t exist&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; ! -f &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$icon_path&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; cat &amp;gt; &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$icon_path&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;&amp;lt;EOF
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;&amp;lt;svg width=&amp;#34;128&amp;#34; height=&amp;#34;128&amp;#34; xmlns=&amp;#34;http://www.w3.org/2000/svg&amp;#34;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt; &amp;lt;rect width=&amp;#34;128&amp;#34; height=&amp;#34;128&amp;#34; fill=&amp;#34;#$colour&amp;#34; /&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;&amp;lt;/svg&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;EOF&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I&amp;rsquo;m rather pleased with myself for this solution.
Each time you pick a colour, it generates a tiny SVG file that&amp;rsquo;s just a coloured square.
Fuzzel then displays this next to the hex code in the menu. Well done brain! 🧠&lt;/p&gt;
&lt;h3 id="menu-building"&gt;Menu Building&lt;/h3&gt;
&lt;p&gt;The menu itself is built dynamically, showing an eyedropper icon for picking a new colour followed by your colour history:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;function&lt;/span&gt; build_menu&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; -e &lt;span class="s2"&gt;&amp;#34;Pick a colour\0icon\x1f&lt;/span&gt;&lt;span class="nv"&gt;$ICONS_DIR&lt;/span&gt;&lt;span class="s2"&gt;/eyedropper.svg&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;# Add history items if they exist&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; -s &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$HISTORY_FILE&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="nb"&gt;read&lt;/span&gt; -r colour&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;# If the preview icon doesn&amp;#39;t exist, generate it&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; ! -e &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$ICONS_DIR&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;$colour&lt;/span&gt;&lt;span class="s2"&gt;.svg&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; generate_svg_icon &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$colour&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;# Display the colour with a preview&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; -e &lt;span class="s2"&gt;&amp;#34;#&lt;/span&gt;&lt;span class="nv"&gt;$colour&lt;/span&gt;&lt;span class="s2"&gt;\0icon\x1f&lt;/span&gt;&lt;span class="nv"&gt;$ICONS_DIR&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;$colour&lt;/span&gt;&lt;span class="s2"&gt;.svg&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;done&lt;/span&gt; &amp;lt; &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$HISTORY_FILE&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This uses the &lt;a href="https://github.com/davatorium/rofi"&gt;&lt;code&gt;rofi&lt;/code&gt;&lt;/a&gt; &amp;ldquo;protocol&amp;rdquo; for menu items, something Fuzzel has built-in support for 💖
The &lt;code&gt;\0icon\x1f&lt;/code&gt; bit is how you tell Fuzzel &lt;em&gt;&amp;ldquo;hey, use this icon for this menu item&amp;rdquo;&lt;/em&gt;.&lt;/p&gt;
&lt;h3 id="putting-it-all-together"&gt;Putting It All Together&lt;/h3&gt;
&lt;p&gt;The full workflow goes like this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Press &lt;kbd&gt;Ctrl&lt;/kbd&gt; + &lt;kbd&gt;Alt&lt;/kbd&gt; + &lt;kbd&gt;K&lt;/kbd&gt; to open the picker&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;&amp;ldquo;Pick a colour&amp;rdquo;&lt;/strong&gt; or choose one from your history&lt;/li&gt;
&lt;li&gt;If picking a new colour, &lt;code&gt;hyprpicker&lt;/code&gt; does it&amp;rsquo;s thing and click anywhere on screen&lt;/li&gt;
&lt;li&gt;The colour gets automatically copied to your clipboard&lt;/li&gt;
&lt;li&gt;A notification appears showing the selected colour&lt;/li&gt;
&lt;/ol&gt;
&lt;p class="text-center"&gt;
&lt;img src="./hyprpicker-select.png" class="img-fluid" alt="hyprpicker colour selection "/&gt;
&lt;br /&gt;
&lt;em&gt;hyprpicker colour selection&lt;/em&gt;
&lt;/p&gt;
&lt;h2 id="integrating-it-with-your-setup"&gt;Integrating It With Your Setup&lt;/h2&gt;
&lt;p&gt;Want to give this a try yourself?
Here&amp;rsquo;s how to adapt it to your wlroots-compatible desktop:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;First, make sure you have the following installed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;hyprpicker&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;fuzzel&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/bugaevc/wl-clipboard"&gt;&lt;code&gt;wl-clipboard&lt;/code&gt;&lt;/a&gt; (for clipboard management)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/nowrep/notify-desktop"&gt;&lt;code&gt;notify-desktop&lt;/code&gt;&lt;/a&gt; (for notifications)
&lt;ul&gt;
&lt;li&gt;Although I&amp;rsquo;m planning on switching to &lt;a href="https://codeberg.org/dnkl/fyi"&gt;&lt;code&gt;fyi&lt;/code&gt;&lt;/a&gt; soon&amp;hellip;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Save the script somewhere in your path (I&amp;rsquo;ve got mine as part of &lt;a href="https://github.com/wimpysworld/nix-config"&gt;my Nix configuration&lt;/a&gt;) ️❄️&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Make it executable:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;chmod +x fuzzel-hyprpicker.sh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start="4"&gt;
&lt;li&gt;Bind it to a keyboard shortcut in your Hyprland config:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;bind = CTRL ALT, K, exec, fuzzel-hyprpicker.sh
&lt;/code&gt;&lt;/pre&gt;&lt;ol start="5"&gt;
&lt;li&gt;Give it a whirl!&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It should work with any wlroots-compatible compositor, not just Hyprland.&lt;/p&gt;
&lt;h2 id="possible-enhancements"&gt;Possible Enhancements&lt;/h2&gt;
&lt;p&gt;This is very much a v1 and there&amp;rsquo;s plenty of room for improvement:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add support for different colour formats (RGB, HSL, etc.)&lt;/li&gt;
&lt;li&gt;Implement colour name lookup&lt;/li&gt;
&lt;li&gt;Create a proper project rather than just a script wedged in my Nix configuration&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But for a morning hack, it&amp;rsquo;s been surprisingly useful!
Reaching for &lt;kbd&gt;Ctrl&lt;/kbd&gt; + &lt;kbd&gt;Alt&lt;/kbd&gt; + &lt;kbd&gt;K&lt;/kbd&gt; brings a smile to my face 😀&lt;/p&gt;
&lt;h2 id="the-joy-of-keyboard-driven-workflows"&gt;The Joy of Keyboard-Driven Workflows&lt;/h2&gt;
&lt;p&gt;What I love about tools like this is how they contribute to a cohesive, keyboard-driven workflow.
Between Hyprland&amp;rsquo;s tiling, Waybar&amp;rsquo;s status info, and Fuzzel-based menus for everything from launching apps to picking colours, my fingers rarely stray from the keyboard these days.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s something deeply satisfying about crafting your own tools to scratch your own itches.
It&amp;rsquo;s a long held Linux desktop tradition, isn&amp;rsquo;t it?
Taking what works, improving what doesn&amp;rsquo;t, and sharing the results with others.&lt;/p&gt;
&lt;p class="text-center"&gt;
&lt;a href="https://linuxmatters.sh" target="_blank"&gt;&lt;img src="./hyprland-desktop.png" class="img-fluid" alt="hyprland desktop with fuzzel-hyprpicker "/&gt;&lt;/a&gt;
&lt;br /&gt;
&lt;em&gt;My hyprland desktop with fuzzel-hyprpicker in action&lt;/em&gt;
&lt;/p&gt;
&lt;h2 id="more-fuzzel-based-tools"&gt;More Fuzzel-Based Tools?&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;ve created several other Fuzzel menus that integrate with my Hyprland desktop.
I should probably post about those as well - emoji picker and screenshot and screen recording being among my most useful.
Let me know in the comments if you&amp;rsquo;d be interested in seeing those! 👇&lt;/p&gt;
&lt;p&gt;In the meantime, give &lt;code&gt;fuzzel-hyprpicker.sh&lt;/code&gt; a try and let me know what you think.
&lt;strong&gt;And if you improve upon it, &lt;em&gt;please do share your changes!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The full script is available in my Nix config repository: &lt;a href="https://github.com/wimpysworld/nix-config/blob/main/home-manager/_mixins/desktop/hyprland/fuzzel/fuzzel-hyprpicker.sh"&gt;fuzzel-hyprpicker.sh&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Happy colour picking! 🎨🤏&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Have you created any custom tools for your Wayland desktop? Are there any X11 utilities you miss since switching? Let me know in the comments below!&lt;/em&gt;&lt;/p&gt;</description><summary>Creating a Proper Colour Picker for Hyprland with Fuzzel</summary></item><item><title>Install ZeroTier on Steam Deck</title><link>https://blog.wimpys.world/posts/install-zerotier-on-steamdeck/</link><pubDate>Thu, 17 Aug 2023 12:15:45 +0100</pubDate><author>martin@wimpress.com (Martin Wimpress)</author><guid>https://wimpysworld.com/posts/install-zerotier-on-steamdeck/</guid><description>&lt;p&gt;It took 9 episodes of &lt;a href="https://linuxmatters.sh"&gt;Linux Matters&lt;/a&gt; for my friends and co-hosts &lt;a href="https://linuxmatters.sh/host/apope/"&gt;Alan&lt;/a&gt; and &lt;a href="https://linuxmatters.sh/host/mjohnson/"&gt;Mark&lt;/a&gt; to wear down 😅 my resolve to buy a &lt;a href="https://www.steamdeck.com/en/"&gt;Steam Deck&lt;/a&gt;, even &lt;a href="https://blog.wimpys.world/posts/steambox-vs-steamdeck/"&gt;after I passed on my original Steam Deck pre-order&lt;/a&gt;.
I&amp;rsquo;m glad they did, it&amp;rsquo;s a great little device and a dream come true for Linux 🐧 nerds; excellent hardware and completely hackable 🧑‍💻&lt;/p&gt;
&lt;p&gt;I ordered the 64GB model via the recently announced &lt;a href="https://store.steampowered.com/sale/steamdeckrefurbished"&gt;Steam Deck™ Certified Refurbished&lt;/a&gt; program.
I&amp;rsquo;m going to resist retrofitting a larger NVMe SSD, and have instead added a 1TB microSDXC card 💾
The 64GB internal eMMC storage will be used for SteamOS and the microSDXC card will be used exclusively for games 🕹️&lt;/p&gt;
&lt;p&gt;While I&amp;rsquo;m avoiding hardware modifications, I do want to install some software enhancements on the Steam Deck; specifically &lt;a href="https://www.zerotier.com/"&gt;ZeroTier&lt;/a&gt;.
&lt;strong&gt;I spoke enthusiastically about ZeroTier in &lt;a href="https://linuxmatters.sh/episodes/8/"&gt;Linux Matters: Picking Apart the Steam Deck (Episode 8)&lt;/a&gt;&lt;/strong&gt;; it is as essential as WiFi for me.
So, give that episode a listen to hear why I love ZeroTier so much 💖&lt;/p&gt;
&lt;p class="text-center"&gt;
&lt;a href="https://linuxmatters.sh" target="_blank"&gt;&lt;img src="https://linuxmatters.sh/img/episode/linuxmatters-banner-3000x750.webp" class="img-fluid" alt="Linux Matters Podcast"/&gt;&lt;/a&gt;
&lt;br /&gt;
&lt;em&gt;Linux Matters Podcast&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;What follows is a guide to installing ZeroTier on the Steam Deck, &lt;strong&gt;but this technique can be used to install any software on Steam Deck that is available for Arch Linux&lt;/strong&gt; 👍️&lt;/p&gt;
&lt;h1 id="installing-zerotier-on-steam-deck"&gt;Installing ZeroTier on Steam Deck&lt;/h1&gt;
&lt;p&gt;The Steam Deck has a (&lt;em&gt;mostly&lt;/em&gt;) read-only filesystem.
We&amp;rsquo;ll use &lt;a href="https://github.com/ValShaped/rwfus"&gt;Rwfus: Read-Write OverlayFS for your Steam Deck&lt;/a&gt; to install ZeroTier so that it persists across reboots &lt;em&gt;and&lt;/em&gt; SteamOS updates.&lt;/p&gt;
&lt;p&gt;The author describes &lt;code&gt;rwfus&lt;/code&gt; as:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a vinyl couch cover for your filesystem, Rwfus covers your Deck&amp;rsquo;s &lt;code&gt;/usr/&lt;/code&gt; directory (and some others) allowing you to initialize and use &lt;code&gt;pacman&lt;/code&gt; (the Arch Linux package manager) on the Steam Deck without losing packages when the next update comes out.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Perfect 👌️&lt;/p&gt;
&lt;h2 id="enter-the-desktop"&gt;Enter the Desktop&lt;/h2&gt;
&lt;p&gt;The process of installing and configuring ZeroTier requires the use of the Steam Deck desktop mode.
Connecting a mouse 🖱️ and keyboard ⌨️ to the Steam Deck will make this process much easier.
After the Steam Deck has booted you should Switch to Desktop.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Press the &amp;ldquo;Steam&amp;rdquo; button on the Steam Deck and scroll down through the menu and select &amp;ldquo;Power&amp;rdquo;.&lt;/li&gt;
&lt;li&gt;Then, select the &amp;ldquo;Switch to Desktop&amp;rdquo; option.&lt;/li&gt;
&lt;li&gt;Once the desktop has loaded, click on the Steam Deck logo in the lower-left corner of the desktop to bring up the menu.&lt;/li&gt;
&lt;li&gt;Select &amp;ldquo;System&amp;rdquo; in the left column and then &amp;ldquo;Konsole&amp;rdquo; from the right column.
&lt;ul&gt;
&lt;li&gt;You can also press the Super key and type in &amp;ldquo;Konsole&amp;rdquo; in the search bar.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Suddenly, as if by magic, the terminal appeared 🪄&lt;/li&gt;
&lt;/ul&gt;
&lt;p class="text-center"&gt;
&lt;img src="./magic-terminal.webp" class="img-fluid" alt="Konsole"/&gt;
&lt;br /&gt;
&lt;em&gt;Konsole on Steam Deck&lt;/em&gt;
&lt;/p&gt;
&lt;h2 id="set-a-password"&gt;Set a Password&lt;/h2&gt;
&lt;p&gt;By default, no password 🔓️ is set for the &lt;code&gt;deck&lt;/code&gt; user.
With no password set, it is not possible to run commands in the root context using &lt;code&gt;sudo&lt;/code&gt;.
Type &lt;code&gt;passwd&lt;/code&gt; in the terminal to set a password.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;(&lt;/span&gt;deck@steamdeck ~&lt;span class="o"&gt;)&lt;/span&gt; $ passwd
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;New Password:
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Retype New Password:
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="install-rwfus"&gt;Install Rwfus&lt;/h2&gt;
&lt;p&gt;With that done we can install &lt;code&gt;rwfus&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git clone https://github.com/ValShaped/rwfus.git
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; rwfus
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./rwfus -iI
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="install-zerotier"&gt;Install ZeroTier&lt;/h2&gt;
&lt;p&gt;Run &lt;code&gt;sudo pacman -Sy&lt;/code&gt; to update your repositories 🌿
Now install ZeroTier.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo pacman -S zerotier-one
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="enable-and-start-zerotier-service"&gt;Enable and Start ZeroTier service&lt;/h3&gt;
&lt;p&gt;ZeroTier installs its systemd unit in &lt;code&gt;/usr/lib/systemd/system/&lt;/code&gt;, but as we&amp;rsquo;re installing while Rwfus is active that service file is installed into the Rwfus overlay.
This is a problem because running &lt;code&gt;systemctl enable zerotier-one&lt;/code&gt; now would create a systemd unit in &lt;code&gt;/etc/systemd/system/multi-user.target.wants/&lt;/code&gt; that references a file in &lt;code&gt;/usr&lt;/code&gt;, and that file will not exist until Rwfus is running.
The effect is that the ZeroTier service will not start on boot as systemd will not be able to find the service file.&lt;/p&gt;
&lt;p&gt;But there is a simple workaround, copy the ZeroTier service file to &lt;code&gt;/etc/systemd/system&lt;/code&gt;, which is fine as &lt;code&gt;/etc&lt;/code&gt; is already a writable overlay.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cp /usr/lib/systemd/system/zerotier-one.service /etc/systemd/system/zerotier-one.service
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now, enable and start the ZeroTier service.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; zerotier-one --now
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="join-a-zerotier-network"&gt;Join a ZeroTier Network&lt;/h2&gt;
&lt;p&gt;Find your ZeroTier device ID (a 10-digit hexadecimal number) by running:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo zerotier-cli info
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The output will look 👀 something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;200 info deadbeef00 1.10.1 OFFLINE
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Join a ZeroTier network using a network ID (a 16-digit hexadecimal number) which you can get from the &lt;a href="https://my.zerotier.com/"&gt;My ZeroTier page&lt;/a&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo zerotier-cli join &amp;lt;network id&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Return to the &lt;a href="https://my.zerotier.com/"&gt;My ZeroTier page&lt;/a&gt; select the network you joined, scroll down to the Members section and authorize the Steam Deck device ID.&lt;/p&gt;
&lt;p&gt;Verify that the Steam Deck is correctly allocated an IP address, this may take up to 30 seconds ⏳️&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ip --brief addr &lt;span class="p"&gt;|&lt;/span&gt; grep ^zt
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You should see 👁️ output similar to this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;zta1b2c3d4 UNKNOWN 192.168.192.59/24 baad::4a4a:faff:fefe:5aa5/64
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="use-your-zerotier-network"&gt;Use your ZeroTier network&lt;/h2&gt;
&lt;p&gt;You can now connect from your Steam Deck to other devices on the same ZeroTier network.
Or you could enable SSH on the Steam Deck and then log in to it from another device on the ZeroTier network 💪&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; sshd --now
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;With ZeroTier installed on the Steam Deck, it is part of my network where ever I may roam; and enables some interesting possibilities such as remote play from anywhere in the world or &lt;a href="https://steamcommunity.com/sharedfiles/filedetails/?id=2632149295"&gt;playing LAN multi-player games with remote friends&lt;/a&gt;.
Share in the comments how you&amp;rsquo;re using ZeroTier on your Steam Deck 💬&lt;/p&gt;
&lt;p class="text-center"&gt;
&lt;img src="./SteamDeck-ZeroTier.webp" class="img-fluid" alt="Steam Deck with ZeroTier"/&gt;
&lt;br /&gt;
&lt;em&gt;Steam Deck&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ll be keeping my Steam Deck software modifications to a minimum 🤏 but where I do make changes I&amp;rsquo;ll be careful not to disrupt the SteamOS root file systems or potentially break SteamOS updates.
I&amp;rsquo;m glad solutions like Rwfus exist to allow me to install the software I need. But&amp;hellip;. 🤔&lt;/p&gt;
&lt;p&gt;&lt;a href="https://nixos.org"&gt;Nix&lt;/a&gt; is what I work on as my day job at &lt;a href="https://determinate.systems"&gt;Determinate Systems&lt;/a&gt; ❄️
I&amp;rsquo;m creating a little project that any Steam Deck owner can use to bring the power of Nix to Steam Deck while maintaining isolation from the SteamOS root file system.
That project depends on the &lt;a href="https://github.com/DeterminateSystems/nix-installer"&gt;Determinate Nix Installer&lt;/a&gt;, &lt;strong&gt;which natively supports Steam Deck&lt;/strong&gt;.
So, if you want to get a head start with Nix on the Steam Deck then you can do that today 🙂&lt;/p&gt;</description><summary>How to persist software installation across SteamOS updates on the Steam Deck.</summary></item></channel></rss>