<?xml version="1.0" encoding="UTF-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Gunwant Jain - @wantguns - blog</title>
    <subtitle>Gunwant Jain&#x27;s blog</subtitle>
    <link rel="self" type="application/atom+xml" href="https://wantguns.dev/blog/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://wantguns.dev/blog/"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2025-04-10T00:00:00+00:00</updated>
    <id>https://wantguns.dev/blog/atom.xml</id>
    <entry xml:lang="en">
        <title>Installing NixOS Remotely with nixos-anywhere</title>
        <published>2025-04-10T00:00:00+00:00</published>
        <updated>2025-04-10T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Gunwant Jain
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://wantguns.dev/blog/nixos-anywhere/"/>
        <id>https://wantguns.dev/blog/nixos-anywhere/</id>
        
        <content type="html" xml:base="https://wantguns.dev/blog/nixos-anywhere/">&lt;p&gt;&lt;code&gt;nixos-anywhere&lt;&#x2F;code&gt; is a cool tool which can be used to installed nixos on:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;an existing linux installation using kexec&lt;&#x2F;li&gt;
&lt;li&gt;a baremetal machine&lt;&#x2F;li&gt;
&lt;li&gt;and both of those options remotely using ssh&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;It is a part of the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;nix-community&quot;&gt;nix-community&lt;&#x2F;a&gt; suite,
and works well with
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;nix-community&#x2F;nixos-facter&quot;&gt;nixos-facter&lt;&#x2F;a&gt; for specifying
the hardware configuration and &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;nix-community&#x2F;disko&quot;&gt;disko&lt;&#x2F;a&gt;
for declarative disk layout management.&lt;&#x2F;p&gt;
&lt;p&gt;It is meant to run once and if successful you are left with your
desired NixOS configured according to your &lt;code&gt;nixosConfigurations&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;setting-up-my-physical-homeserver&quot;&gt;Setting up my physical homeserver&lt;&#x2F;h2&gt;
&lt;p&gt;Let&#x27;s set up the Dell Optiplex 3040 I am going to use as my homeserver. I&#x27;ll
call this host &lt;code&gt;mintaka&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The Optiplex was set to boot on BIOS by default, I changed that to UEFI
from the motherboard settings.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;adding-the-host-to-the-flake&quot;&gt;Adding the host to the flake&lt;&#x2F;h3&gt;
&lt;p&gt;Simply define the host in the flake.nix&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; inside flake.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;hosts&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CD3131, #F44747);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;    #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;mintaka&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;my&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;mkHostConfig&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      hostname&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;mintaka&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      system&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;x86_64-linux&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      username&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;wantguns&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      remoteBuild&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      ips&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        private&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;192.168.1.130&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;booting&quot;&gt;Booting&lt;&#x2F;h3&gt;
&lt;p&gt;First, I created a bootable disk using an iso which supports
&lt;code&gt;nixos-facter&lt;&#x2F;code&gt;, I am using
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;nix-community&#x2F;nixos-images&quot;&gt;nixos-community&#x2F;nixos-images&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;And boot it on &lt;code&gt;mintaka&lt;&#x2F;code&gt;, add my ssh key:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;p&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .ssh&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt; echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHcueIcj4fgzD6cUUGqituoupjexNNF1Hjrr+dyJ+gvA gunwant.jain@C02GH2V9MD6M.local&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; &amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .ssh&#x2F;authorized_keys&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;nixos-facter&quot;&gt;nixos-facter&lt;&#x2F;h3&gt;
&lt;p&gt;I am going to generate the hardware configuration for &lt;code&gt;mintaka&lt;&#x2F;code&gt; using
nixos-facter:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;nixos-facter&lt;&#x2F;span&gt;&lt;span&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; hosts&#x2F;linux&#x2F;mintaka&#x2F;facter.json&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;I&#x27;ll add this copy of &lt;code&gt;facter.json&lt;&#x2F;code&gt; to my nix flake.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;disko&quot;&gt;disko&lt;&#x2F;h3&gt;
&lt;p&gt;Next, I&#x27;ll declare my disk layout. I am choosing to try ZFS for the
first time. Other machines that I own run on BTRFS, and I haven&#x27;t faced
any data loss as of now, but I also wanted to give OpenZFS a shot:&lt;&#x2F;p&gt;
&lt;details&gt;
  &lt;summary&gt;hosts&#x2F;linux&#x2F;mintaka&#x2F;disk-config.nix&lt;&#x2F;summary&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; inside hosts&#x2F;linux&#x2F;mintaka&#x2F;disk-config.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  disko&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;devices&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    disk&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      main&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        type&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;disk&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        device&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;dev&#x2F;sda&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        content&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          type&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;gpt&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          partitions&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            ESP&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;              size&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;512M&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;              type&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;EF00&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;              content&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;                type&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;filesystem&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;                format&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;vfat&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;                mountpoint&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;boot&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;                mountOptions&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;defaults&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            zfs&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;              size&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;100%&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;              content&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;                type&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;zfs&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;                pool&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;zroot&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    zpool&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      zroot&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        type&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;zpool&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        rootFsOptions&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          mountpoint&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;none&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          compression&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;zstd&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          acltype&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;posixacl&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          xattr&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;sa&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          atime&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;off&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          relatime&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;on&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;          &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;com.sun:auto-snapshot&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;false&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        options&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          ashift&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;12&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          autotrim&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;on&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        datasets&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;          &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;root&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            type&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;zfs_fs&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            mountpoint&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;          &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;root&#x2F;nix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            type&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;zfs_fs&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            mountpoint&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;nix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;          &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;root&#x2F;var&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            type&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;zfs_fs&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            mountpoint&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;var&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;          &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;root&#x2F;var&#x2F;log&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            type&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;zfs_fs&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            mountpoint&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;var&#x2F;log&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;          &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;root&#x2F;home&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            type&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;zfs_fs&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            mountpoint&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;home&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;          &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;root&#x2F;swap&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            type&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;zfs_volume&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            size&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;4G&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            content&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;              type&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;swap&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            options&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;              volblocksize&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;4096&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;              compression&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;zle&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;              logbias&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;throughput&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;              sync&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;always&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;              primarycache&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;metadata&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;              secondarycache&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;none&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;              &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;com.sun:auto-snapshot&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;false&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;details&gt;
&lt;p&gt;I had already configured our nix flake to include the modules for disko
and our facter config with the nixosSystem builder in a previous blog &lt;sup class=&quot;footnote-reference&quot;&gt;&lt;a href=&quot;#1&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;installing&quot;&gt;Installing&lt;&#x2F;h3&gt;
&lt;p&gt;We can finally use the nix flake to install NixOS on &lt;code&gt;mintaka&lt;&#x2F;code&gt;.
&lt;code&gt;nixos-anywhere&lt;&#x2F;code&gt; looks for nixosConfiguration in the flake. I copied the
nix flake to the host and ran:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;nix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; run&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; github:nix-community&#x2F;nixos-anywhere&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-flake&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .#mintaka&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-target-host&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; root@127.0.0.1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-build-on&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; remote&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And after some time, the machine rebooted and I was presented with a
fresh OS install, with all my dotfiles and settings configured. For the
up-to-date summary of changes I have made on my host, I can now refer to
its &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;wantguns&#x2F;dotfiles&#x2F;commits&#x2F;nix&#x2F;hosts&#x2F;linux&#x2F;mintaka&quot;&gt;git history&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;setting-up-my-oracle-vm&quot;&gt;Setting up my Oracle VM&lt;&#x2F;h2&gt;
&lt;p&gt;Back when Oracle generously started handing out free instances, I
quickly got one in the Mumbai region. Oracle&#x27;s choices for host
operating systems were limited and I went ahead with Ubuntu Linux at
that time.&lt;&#x2F;p&gt;
&lt;p&gt;It is a meaty 4 arm64 core and 24GiB ram server, which I definetely want
to include in my fleet of servers. It also acted as test bed for remote
installtions and its the first and only arm64 machine in my fleet.&lt;&#x2F;p&gt;
&lt;p&gt;I am naming this server &lt;code&gt;bellatrix&lt;&#x2F;code&gt;. Let&#x27;s get started.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;facter&quot;&gt;Facter&lt;&#x2F;h3&gt;
&lt;p&gt;This VM was so old that facter failed to get some udev environment
variables which were added 2 years ago in systemd. I worked around this
by checking systemd&#x27;s codebase history and posted my method on a
recently open github issue (now closed):&lt;br &#x2F;&gt;
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;nix-community&#x2F;nixos-facter&#x2F;issues&#x2F;184#issuecomment-2746239524&quot;&gt;nix-community&#x2F;nixos-facter #184&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;adding-the-host-on-my-flake&quot;&gt;Adding the host on my flake&lt;&#x2F;h3&gt;
&lt;p&gt;I can finally bear the fruits of my labor, adding a new host is as easy
as adding a new commit:&lt;br &#x2F;&gt;
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;wantguns&#x2F;dotfiles&#x2F;commit&#x2F;7580411c0ecb7f2f8a3dbcc1f1589b4e5c5867cb&quot;&gt;wantguns&#x2F;dotfiles: hosts: onboard bellatrix&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Here is the host attribute set entry:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;bellatrix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CD3131, #F44747);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;my&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;mkHostConfig&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  hostname&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;bellatrix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  system&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;aarch64-linux&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  username&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;wantguns&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  remoteBuild&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  ips&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    public&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;lt;public-ip&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CD3131, #F44747);&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And this is disk config:&lt;&#x2F;p&gt;
&lt;details&gt;
  &lt;summary&gt;hosts&#x2F;linux&#x2F;bellatrix&#x2F;disk-config.nix&lt;&#x2F;summary&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Preserving the original fs layout&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  disko&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;devices&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    disk&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      main&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        device&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;dev&#x2F;sda&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        type&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;disk&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        content&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          type&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;gpt&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          partitions&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            ESP&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;              size&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;100M&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;              type&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;EF00&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; EFI System Partition&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;              content&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;                type&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;filesystem&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;                format&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;vfat&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;                mountpoint&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;boot&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            root&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;              size&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;100%&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Use all remaining space&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;              content&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;                type&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;filesystem&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;                format&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;ext4&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;                mountpoint&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;                extraArgs&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;-L&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;cloudimg-rootfs&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Preserve the LABEL from fstab&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;details&gt;
&lt;p&gt;I decided to not tinker with the original disk layout a lot.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;installing-using-kexec&quot;&gt;Installing using kexec&lt;&#x2F;h3&gt;
&lt;p&gt;With the host added and configured, I had to run a single command to
install NixOS through &lt;code&gt;kexec&lt;&#x2F;code&gt; (thus overwriting the Ubuntu image):&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;nix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; run&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; github:nix-community&#x2F;nixos-anywhere&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-flake&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .#bellatrix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-target-host&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; root@&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;public-i&lt;&#x2F;span&gt;&lt;span&gt;p&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-build-on&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; remote&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;concluding&quot;&gt;Concluding&lt;&#x2F;h2&gt;
&lt;p&gt;Nix is helping me a lot to simplify operating a fleet of servers
declaratively. I can now make more changes to any of these servers by
running our &lt;code&gt;deploy&lt;&#x2F;code&gt; nix flake app:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;nix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; run&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .#deploy&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; mintaka&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;nix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; run&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .#deploy&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; bellatix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;I can run this command from a remote machine which has SSH access to the
target machine, and it just works.&lt;&#x2F;p&gt;
&lt;p&gt;Up next, I am going to try to create a common Wireguard
network between &lt;code&gt;mintaka&lt;&#x2F;code&gt; and &lt;code&gt;bellatrix&lt;&#x2F;code&gt; and try to create abstractions
which would make it easier for me to onboard a new Wireguard peer on my
fleet.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;div class=&quot;footnote-definition&quot; id=&quot;1&quot;&gt;&lt;sup class=&quot;footnote-definition-label&quot;&gt;1&lt;&#x2F;sup&gt;
&lt;p&gt;https:&#x2F;&#x2F;wantguns.dev&#x2F;nixmultihost&#x2F;#lib-mkhost-nix&lt;&#x2F;p&gt;
&lt;&#x2F;div&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Single flake, multiple hosts</title>
        <published>2025-03-14T00:00:00+00:00</published>
        <updated>2025-03-14T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Gunwant Jain
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://wantguns.dev/blog/nixmultihost/"/>
        <id>https://wantguns.dev/blog/nixmultihost/</id>
        
        <content type="html" xml:base="https://wantguns.dev/blog/nixmultihost/">&lt;p&gt;I am done with setting up darwin machines now, and look forward to
expand our nix files to declare state for linux hosts as well. The linux
landscape is vast though, I could be logging into a work server, an
embedded device, a server I rent, my personal workstation, etc. There is
different amounts of state I want similar in these machines. And so it
warrants for a better file structure.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;├── flake.lock&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;├── flake.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;├── hosts&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   ├── common&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   │   └── default.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   ├── darwin&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   │     ├── common.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   │     └── C02GH2V9MD6M&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   │         ├── default.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   │         ├── git&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   │         │   ├── ola&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   │         │   └── olamessage&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   │         └── home.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   └── linux&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│       ├── common.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│       └── rigel&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│           ├── default.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│           └── home.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;├── lib&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   ├── default.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   ├── deploy.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   ├── mkHomeConfig.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   ├── mkHost.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   ├── mkHostConfig.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   └── utils.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;└──modules&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    └── features&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        ├── default.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        ├── implementation.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        ├── git&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        │   ├── config.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        │   └── message&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        ├── nvim&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        │   ├── base.lua&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        │   └── treesitter.lua&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        ├── tmux&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        │   └── tmux.conf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        └── zsh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            ├── p10k.zsh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            └── zshrc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;abstractions&quot;&gt;Abstractions&lt;&#x2F;h2&gt;
&lt;p&gt;The idea is to basically have common sets of attributes at different
levels - per os and per host.&lt;&#x2F;p&gt;
&lt;p&gt;Also, I don&#x27;t frequently change my dotfiles, I have the opportunity to
abstract features like if I want neovim to be configured with LSP or
not, basically have a features attribute for home manager.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;modules-features-default-nix&quot;&gt;modules&#x2F;features&#x2F;default.nix&lt;&#x2F;h3&gt;
&lt;p&gt;I&#x27;ll declare all the abstractions for home manager options in this file.&lt;&#x2F;p&gt;
&lt;details&gt;
  &lt;summary&gt;modules&#x2F;features&#x2F;default.nix&lt;&#x2F;summary&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; ...&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;with&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  options&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;features&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    editors&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      nvim&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; mkEnableOption&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;neovim editor&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        ui&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; mkEnableOption&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;add ui elements&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        lsp&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; mkEnableOption&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;neovim LSP and treesitter support&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;        #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    shell&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      zsh&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; mkEnableOption&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;zsh shell&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        powerlevel10k&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; mkEnableOption&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;powerlevel10k theme&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    tmux&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; mkEnableOption&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;tmux terminal multiplexer&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    git&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; mkEnableOption&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;git with delta&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        delta&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; mkEnableOption&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;git-delta&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;details&gt;
&lt;h3 id=&quot;modules-features-implementation-nix&quot;&gt;modules&#x2F;features&#x2F;implementation.nix&lt;&#x2F;h3&gt;
&lt;p&gt;I&#x27;ll implement the declared options in this file.&lt;&#x2F;p&gt;
&lt;details&gt;
  &lt;summary&gt;modules&#x2F;features&#x2F;implementation.nix&lt;&#x2F;summary&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; config&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; pkgs&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; ...&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;let&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  cfg&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; config&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;features&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  toLua&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; str&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EE0000, #D7BA7D);&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;lua &amp;lt;&amp;lt; EOF&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EE0000, #D7BA7D);&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;str&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EE0000, #D7BA7D);&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;EOF&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  toLuaFile&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; file&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EE0000, #D7BA7D);&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;lua &amp;lt;&amp;lt; EOF&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EE0000, #D7BA7D);&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;builtins&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;readFile&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; file&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EE0000, #D7BA7D);&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;EOF&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  fromGitHub&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; ref&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; repo&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; sha256&lt;&#x2F;span&gt;&lt;span&gt; ?&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;fakeSha256&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;    pkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;vimUtils&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;buildVimPlugin&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      pname&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;strings&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;sanitizeDerivationName&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; repo&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      version&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; ref&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      src&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; pkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;fetchFromGitHub&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        owner&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;strings&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;elemAt&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;strings&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;splitString&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; repo&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        repo&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;strings&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;elemAt&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;strings&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;splitString&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; repo&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        rev&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; ref&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        sha256&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; sha256&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  fakeVimPlugin&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; pkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;runCommand&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;fakeVimPlugin&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;mkdir $out&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;in&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  config&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;mkMerge&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      home&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        stateVersion&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;24.11&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        packages&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; with&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; pkgs&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;          ripgrep&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      programs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;home-manager&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;    #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Neovim configuration&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;mkIf&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; cfg&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;editors&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;nvim&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;enable&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      programs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;neovim&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        defaultEditor&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        viAlias&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        vimAlias&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        vimdiffAlias&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        plugins&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; with&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; pkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;vimPlugins&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;          #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Base configuration&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            plugin&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; fakeVimPlugin&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            config&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; toLuaFile&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;nvim&#x2F;base.lua&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;          plenary-nvim&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        ]&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;        #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; UI Elements - each plugin individually conditioned&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        ++&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;optionals&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; cfg&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;editors&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;nvim&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;ui&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            plugin&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; fromGitHub&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;              ref&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;HEAD&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;              repo&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;bluz71&#x2F;vim-moonfly-colors&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;              sha256&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;c5fxaT8Bc5MzOjJsuU95K9yzTpGqj&#x2F;7QP4GuLfsY4VE=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            config&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;colorscheme moonfly&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;        #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; LSP and Treesitter&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        ++&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;optionals&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; cfg&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;editors&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;nvim&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lsp&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            plugin&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; nvim-treesitter&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;withAllGrammars&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            config&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; toLuaFile&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;nvim&#x2F;treesitter.lua&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            plugin&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; nvim-lspconfig&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            config&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; toLuaFile&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;nvim&#x2F;lsp.lua&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            plugin&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; nvim-cmp&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            config&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; toLuaFile&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;nvim&#x2F;cmp.lua&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;          cmp-nvim-lsp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#CD3131, #F44747);&quot;&gt;      }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CD3131, #F44747);&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;    #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Shell configuration&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;mkIf&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; cfg&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;shell&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;zsh&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;enable&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      programs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;zsh&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        syntaxHighlighting&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        autosuggestion&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        enableCompletion&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        defaultKeymap&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;viins&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        completionInit&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;#39;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;autoload -U compinit &amp;amp;&amp;amp; compinit -u&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;#39;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        history&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          append&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          extended&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          size&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 10000&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          save&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 1000000&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        initExtraFirst&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; builtins&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;readFile&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;zsh&#x2F;zshrc&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        plugins&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;optional&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; cfg&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;shell&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;zsh&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;powerlevel10k&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          name&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;zsh-powerlevel10k&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          src&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;pkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;zsh-powerlevel10k&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;share&#x2F;zsh-powerlevel10k&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          file&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;powerlevel10k.zsh-theme&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;    #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Powerlevel10k configuration&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;mkIf&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;cfg&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;shell&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;zsh&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;enable&lt;&#x2F;span&gt;&lt;span&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; cfg&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;shell&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;zsh&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;powerlevel10k&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      home&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;file&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;.p10k.zsh&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;source&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;zsh&#x2F;p10k.zsh&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;mkIf&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; cfg&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;tmux&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      programs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;tmux&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        extraConfig&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; builtins&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;readFile&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;tmux&#x2F;tmux.conf&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;mkIf&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; cfg&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;git&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;enable&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      programs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;git&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        extraConfig&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt; import&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;git&#x2F;config.nix&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        delta&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; cfg&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;git&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;delta&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      home&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;file&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;.config&#x2F;git&#x2F;message&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;source&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;git&#x2F;message&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#CD3131, #F44747);&quot;&gt;  ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;details&gt;
&lt;p&gt;This enables me to have a &lt;code&gt;hosts&#x2F;darwin&#x2F;&amp;lt;hostname&amp;gt;&#x2F;home.nix&lt;&#x2F;code&gt; like:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; config&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; pkgs&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; ...&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  features&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    editors&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;nvim&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      ui&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      lsp&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    shell&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;zsh&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      powerlevel10k&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    git&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      delta&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    tmux&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  programs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;git&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;includes&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; path&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;~&#x2F;dev&#x2F;.gitconfig&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt; ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;and the their system config, &lt;code&gt;hosts&#x2F;darwin&#x2F;&amp;lt;hostname&amp;gt;&#x2F;default.nix&lt;&#x2F;code&gt; like:&lt;&#x2F;p&gt;
&lt;details&gt;
  &lt;summary&gt;hosts&#x2F;darwin&#x2F;&amp;lt;hostname&amp;gt;&#x2F;default.nix&lt;&#x2F;summary&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Host-specific system configuration&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; config&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; pkgs&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; ...&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  nix&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    settings&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;      &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;ssl-cert-file&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;opt&#x2F;nix-and-zscaler.crt&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  users&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;users&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;lt;username&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    shell&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; pkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;zsh&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    home&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;Users&#x2F;&amp;lt;username&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    packages&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; with&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; pkgs&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;       xh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;       jq&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;       tree&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  homebrew&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    brews&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;     &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;k9s&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;     &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;kubectl&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;details&gt;
&lt;p&gt;Pretty simple right ? I can onboard new hosts and create similar &quot;knobs&quot;
to control state quickly.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;implementation&quot;&gt;Implementation&lt;&#x2F;h2&gt;
&lt;p&gt;In this series, we started with a standalone home-manager installation,
then pushed the home-manager configs into our nix-darwin config.&lt;&#x2F;p&gt;
&lt;p&gt;A layman&#x27;s definition for a nix flake would be that it accepts some
inputs and returns some outputs. Normally, these inputs are the source
to the definition of the packages you want in your outputs, and your
outputs are json like attribute sets which are parsed by a program like
nixos-rebuild or home-manager and do something with it, like building a
new nix profile.&lt;&#x2F;p&gt;
&lt;p&gt;For my concerns, a nix flake that accepts home-manager, nix-darwin and
nixpkgs of course, and returns a set of &lt;code&gt;homeConfigurations&lt;&#x2F;code&gt;,
&lt;code&gt;darwinConfigurations&lt;&#x2F;code&gt; and &lt;code&gt;nixosConfigurations&lt;&#x2F;code&gt; would make
everything easier. Because then I could then call home-manager,
darwin-rebuild or nix-rebuild on the same flake, which will become a
consolidated source of truth for all my hosts.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;hosts-attribute-set&quot;&gt;Hosts attribute set&lt;&#x2F;h3&gt;
&lt;p&gt;To declare the entrypoints and metadata for different hosts, lets
design a spec for hosts. Ideally I want to also be able to perform
&lt;em&gt;remote builds&lt;&#x2F;em&gt; and remote deployments, thats possible for NAT&#x27;d hosts
if they are a part of my wireguard mesh. Basically we should declare a
set of reachable IPs (public, private) for every host. And of course the
username, hostname and the system.&lt;&#x2F;p&gt;
&lt;p&gt;Something like this should work:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;hosts&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CD3131, #F44747);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;C02GH2V9MD6M&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    hostname&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;C02GH2V9MD6M&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    system&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;x86_64-darwin&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    username&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;gunwant.jain1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    justHome&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; false&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    remoteBuild&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; false&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;mintaka&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    hostname&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;mintaka&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    system&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;x86_64-linux&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    username&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;wantguns&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    remoteBuild&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    ips&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      private&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;192.168.1.5&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CD3131, #F44747);&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;I added &lt;code&gt;justHome&lt;&#x2F;code&gt; for letting the flake work on just
homeConfigurations, and &lt;code&gt;remoteBuild&lt;&#x2F;code&gt; for &lt;em&gt;building&lt;&#x2F;em&gt; the nix profile on
the remote host.&lt;&#x2F;p&gt;
&lt;p&gt;Lets make a library function which defines this attribute for us:&lt;&#x2F;p&gt;
&lt;h3 id=&quot;lib-mkhostconfig-nix&quot;&gt;lib&#x2F;mkHostConfig.nix&lt;&#x2F;h3&gt;
&lt;details&gt;
  &lt;summary&gt;lib&#x2F;mkHostConfig.nix&lt;&#x2F;summary&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; inside .&#x2F;lib&#x2F;mkHostConfig.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; ...&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;let&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  utils&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt; import&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;utils.nix&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; inherit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;  inherit&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;utils&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; isDarwin&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; isLinux&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;in&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  mkHostConfig&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; config&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;    let&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      platform&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; isDarwin&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; config&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;system&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; th&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;en&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;darwin&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;        el&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;se&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; if&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; isLinux&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; config&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;system&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; th&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;en&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;linux&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;        el&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;se&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt; throw&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;Unsupported system: &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;config&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;system&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      defaults&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        remoteBuild&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; false&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        justHome&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; false&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        platform&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; platform&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;    in&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;    lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;recursiveUpdate&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; defaults&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; config&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;details&gt;
&lt;p&gt;I added a &lt;code&gt;platform&lt;&#x2F;code&gt; field for the downstream libraries I will pass our
&lt;code&gt;hosts&lt;&#x2F;code&gt; attribute into.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;lib-utils-nix&quot;&gt;lib&#x2F;utils.nix&lt;&#x2F;h3&gt;
&lt;p&gt;Here is the &lt;code&gt;utils.nix&lt;&#x2F;code&gt; file:&lt;&#x2F;p&gt;
&lt;details&gt;
  &lt;summary&gt;lib&#x2F;utils.nix&lt;&#x2F;summary&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; inside lib&#x2F;utils.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; ...&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;let&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  isPlatform&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; system&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; platform&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; builtins&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;match&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;.*-&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;platform&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; system&lt;&#x2F;span&gt;&lt;span&gt; !=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; null&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  isDarwin&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; system&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; isPlatform&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; system&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;darwin&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  isLinux&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; system&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; isPlatform&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; system&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;linux&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;in&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;  inherit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; isPlatform&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; isDarwin&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; isLinux&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;details&gt;
&lt;h3 id=&quot;lib-mkhost-nix&quot;&gt;lib&#x2F;mkHost.nix&lt;&#x2F;h3&gt;
&lt;p&gt;Next, we&#x27;ll make a library function that consumes this host attribute
set and returns a &lt;code&gt;darwinConfiguration&lt;&#x2F;code&gt; or a &lt;code&gt;nixosConfiguration&lt;&#x2F;code&gt;
depending on the &lt;code&gt;system&lt;&#x2F;code&gt; and the &lt;code&gt;platform&lt;&#x2F;code&gt; fields:&lt;&#x2F;p&gt;
&lt;details&gt;
  &lt;summary&gt;lib&#x2F;mkHost.nix&lt;&#x2F;summary&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; inside lib&#x2F;mkHost.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; inputs&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; ...&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;let&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  utils&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt; import&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;utils.nix&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; inherit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;  inherit&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;utils&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; isDarwin&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; isLinux&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;in&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  mkHost&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;    hostConfig&lt;&#x2F;span&gt;&lt;span&gt;@&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hostname&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; platform&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; system&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; username&lt;&#x2F;span&gt;&lt;span&gt; ?&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;wantguns&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ,&lt;&#x2F;span&gt;&lt;span&gt; ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;    let&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      hostDarwin&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; isDarwin&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; system&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      homeDirectory&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; if&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hostDarwin&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;                      th&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;en&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;Users&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;username&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;                      el&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;se&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;home&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;username&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      hmModule&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; if&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hostDarwin&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;                 th&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;en&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; inputs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;home-manager&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;darwinModules&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;home-manager&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;                 el&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;se&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; inputs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;home-manager&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;nixosModules&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;home-manager&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      hostPath&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; ..&#x2F;hosts&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;platform&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;hostname&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      commonPath&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; ..&#x2F;hosts&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;platform&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;common.nix&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      sharedPath&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; ..&#x2F;hosts&#x2F;common&#x2F;default.nix&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      diskoConfigPath&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;hostPath&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;disk-config.nix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      facterJsonPath&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;hostPath&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;facter.json&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      hasDiskoConfig&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; !&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;hostDarwin&lt;&#x2F;span&gt;&lt;span&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; builtins&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;pathExists&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; diskoConfigPath&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      hasFacterJson&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; !&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;hostDarwin&lt;&#x2F;span&gt;&lt;span&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; builtins&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;pathExists&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; facterJsonPath&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      baseModules&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;        sharedPath&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;        commonPath&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;        &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;hostPath&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;default.nix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;        hmModule&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      linuxModules&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; if&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hostDarwin&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; th&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;en&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; el&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;se&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;optional&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hasDiskoConfig&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; inputs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;disko&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;nixosModules&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;disko&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt; ++&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;optional&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hasDiskoConfig&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; diskoConfigPath&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt; ++&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;optional&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hasFacterJson&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; inputs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;nixos-facter-modules&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;nixosModules&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;facter&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt; ++&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;optional&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hasFacterJson&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          facter&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;reportPath&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; facterJsonPath&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      systemBuilder&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; if&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hostDarwin&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;                      th&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;en&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; inputs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;darwin&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;darwinSystem&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;                      el&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;se&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; inputs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;nixosSystem&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;    in&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;    systemBuilder&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;      inherit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; system&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      specialArgs&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; inherit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; inputs&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      modules&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; baseModules&lt;&#x2F;span&gt;&lt;span&gt; ++&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; linuxModules&lt;&#x2F;span&gt;&lt;span&gt; ++&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        nixpkgs&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          config&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;allowUnfree&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          hostPlatform&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; system&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        home-manager&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          useGlobalPkgs&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          useUserPackages&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          extraSpecialArgs&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; inherit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; inputs&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          sharedModules&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;            inputs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;sops-nix&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;homeManagerModules&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;sops&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          users&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;username&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span&gt; ...&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            imports&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;              ..&#x2F;modules&#x2F;features&#x2F;default.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;              ..&#x2F;modules&#x2F;features&#x2F;implementation.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;              &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;hostPath&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;home.nix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;details&gt;
&lt;p&gt;You must be wondering what is &lt;code&gt;disko&lt;&#x2F;code&gt; or &lt;code&gt;facter&lt;&#x2F;code&gt; or &lt;code&gt;sops&lt;&#x2F;code&gt;, and for
that, I&#x27;ll be publishing a separate article. For now this config should
still work on darwin hosts, since all the linux related things are not
included if the &lt;code&gt;system&lt;&#x2F;code&gt; is darwin.&lt;&#x2F;p&gt;
&lt;p&gt;We are basically calling &lt;code&gt;nixosSystem&lt;&#x2F;code&gt; or &lt;code&gt;darwinSystem&lt;&#x2F;code&gt; and then using
the homeManager module specific to that system. Since many of our Home
Manager options are abstracted as à la carte features, we need to
include the features module we created.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;lib-mkhomeconfig-nix&quot;&gt;lib&#x2F;mkHomeConfig.nix&lt;&#x2F;h3&gt;
&lt;p&gt;Next lets create another library function to create
&lt;code&gt;homeConfigurations&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;details&gt;
  &lt;summary&gt;lib&#x2F;mkHomeConfig.nix&lt;&#x2F;summary&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; inside lib&#x2F;mkHomeConfig.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; inputs&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; ...&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;let&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  utils&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt; import&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;utils.nix&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; inherit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;  inherit&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;utils&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; isDarwin&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; isLinux&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;in&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  mkHomeConfig&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hostname&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hostConfig&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;    let&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      system&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hostConfig&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;system&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      username&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hostConfig&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;username&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      platform&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; if&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; isDarwin&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; system&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; th&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;en&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;darwin&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; el&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;se&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;linux&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      hostPath&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; ..&#x2F;hosts&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;platform&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;hostname&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      homeDirectory&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; isDarwin&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; system&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;        th&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;en&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;Users&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;username&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;        el&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;se&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;home&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;username&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;    in&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;    inputs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;home-manager&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;homeManagerConfiguration&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      pkgs&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; inputs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;legacyPackages&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;system&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      extraSpecialArgs&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; inherit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; inputs&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      modules&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;        ..&#x2F;modules&#x2F;features&#x2F;default.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;        ..&#x2F;modules&#x2F;features&#x2F;implementation.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;        &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;hostPath&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;home.nix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          home&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;            inherit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; username&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; homeDirectory&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;details&gt;
&lt;p&gt;This should be pretty explanatory. You can go through my blogs on
&lt;code&gt;home-manager&lt;&#x2F;code&gt; and &lt;code&gt;nix-darwin&lt;&#x2F;code&gt; to have a better picture how our
abstraction is growing.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;lib-default-nix&quot;&gt;lib&#x2F;default.nix&lt;&#x2F;h3&gt;
&lt;p&gt;We&#x27;ll import all of our library functions through the default nix file in this directory.&lt;&#x2F;p&gt;
&lt;details&gt;
  &lt;summary&gt;lib&#x2F;default.nix&lt;&#x2F;summary&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; inside lib&#x2F;default.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; inputs&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  mkHost&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;import&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;mkHost.nix&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; inherit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; inputs&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;mkHost&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  mkHomeConfig&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;import&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;mkHomeConfig.nix&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; inherit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; inputs&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;mkHomeConfig&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  mkHostConfig&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;import&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;mkHostConfig.nix&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; inherit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;mkHostConfig&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  isPlatform&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;import&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;utils.nix&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; inherit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;isPlatform&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  isDarwin&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;import&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;utils.nix&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; inherit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;isDarwin&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  isLinux&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;import&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;utils.nix&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; inherit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;isLinux&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;details&gt;
&lt;h3 id=&quot;flake-nix&quot;&gt;flake.nix&lt;&#x2F;h3&gt;
&lt;p&gt;Finally, we have all the required nix code to iterate our flake:&lt;&#x2F;p&gt;
&lt;details&gt;
  &lt;summary&gt;flake.nix&lt;&#x2F;summary&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  description&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;Nix System Configurations&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  inputs&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;url&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;github:nixos&#x2F;nixpkgs&#x2F;nixos-unstable&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    darwin&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;url&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;github:lnl7&#x2F;nix-darwin&#x2F;master&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    home-manager&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;url&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;github:nix-community&#x2F;home-manager&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    disko&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;url&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;github:nix-community&#x2F;disko&#x2F;latest&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    nixos-facter-modules&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;url&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;github:numtide&#x2F;nixos-facter-modules&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    sops-nix&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;url&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;github:Mic92&#x2F;sops-nix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    darwin&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;follows&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    home-manager&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;follows&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    disko&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;follows&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    sops-nix&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;inputs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;follows&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  outputs&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; inputs&lt;&#x2F;span&gt;&lt;span&gt;@&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; self&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; darwin&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; home-manager&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; ...&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;    let&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      lib&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;extend&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;final&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; prev&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        my&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt; import&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;lib&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; inherit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; inputs&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; prev&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      systems&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;x86_64-linux&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;x86_64-darwin&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;aarch64-linux&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;aarch64-darwin&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      forAllSystems&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;genAttrs&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; systems&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      hosts&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;        &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;C02GH2V9MD6M&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;my&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;mkHostConfig&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          hostname&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;C02GH2V9MD6M&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          system&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;x86_64-darwin&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          username&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;gunwant.jain1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          justHome&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; false&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          remoteBuild&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; false&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;        &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;mintaka&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;my&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;mkHostConfig&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          hostname&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;mintaka&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          system&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;x86_64-linux&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          username&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;wantguns&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          remoteBuild&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          ips&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            private&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;192.168.1.5&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      forAllHosts&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; f&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; builtins&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;mapAttrs&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; f&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hosts&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;    in&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;      inherit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; hosts&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      darwinConfigurations&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; builtins&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;mapAttrs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;name&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hostConfig&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;my&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;mkHost&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hostConfig&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;filterAttrs&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;name&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hostConfig&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;my&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;isDarwin&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hostConfig&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;system&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hosts&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      nixosConfigurations&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; builtins&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;mapAttrs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;name&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hostConfig&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;my&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;mkHost&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hostConfig&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;filterAttrs&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;name&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hostConfig&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;my&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;isLinux&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hostConfig&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;system&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; hosts&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      homeConfigurations&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; forAllHosts&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;my&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;mkHomeConfig&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;details&gt;
&lt;p&gt;Simple enough, we can now use this flake for multiple tools:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; for home-manager&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;nix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; run&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; github:nix-community&#x2F;home-manager&#x2F;master&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; switch&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-flake&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;hostname&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; for darwin-rebuild&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;nix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; run&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; github:lnl7&#x2F;nix-darwin&#x2F;master#darwin-rebuild&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; switch&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-flake&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;hostname&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; for nixos-rebuild&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;nix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; run&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; nixpkgs#nixos-rebuild&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; switch&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-flake&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;hostname&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;remote-deployment-flake-apps&quot;&gt;Remote deployment &amp;amp; Flake apps&lt;&#x2F;h2&gt;
&lt;p&gt;I also want the ability to execute these commands remotely and push
changes remotely to all my hosts. There are a few tools which are
popular - &lt;code&gt;deploy-rs&lt;&#x2F;code&gt;, &lt;code&gt;colmena&lt;&#x2F;code&gt;, &lt;code&gt;clan.lol&lt;&#x2F;code&gt;. I tried each of them and found
out that:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Colmena&lt;&#x2F;strong&gt; does not support hosts of different systems in the same flake (&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;matrix.to&#x2F;#&#x2F;#colmena:nixos.org&#x2F;$zmv3rJLkqDapZUTVuH3QFtZnw7f8wgz8FbKI9srWFN8&quot;&gt;issue&lt;&#x2F;a&gt;)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Deploy-rs&lt;&#x2F;strong&gt; does not support &lt;strong&gt;building on remote&lt;&#x2F;strong&gt;, it only supports copying the build artifacts to remote (&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;serokell&#x2F;deploy-rs&#x2F;issues&#x2F;300&quot;&gt;issue&lt;&#x2F;a&gt;)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Clan.lol&lt;&#x2F;strong&gt; is too restrictive for my taste&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;I recently found out that nixos-rebuild has the remote build ability innately:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;nix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; run&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; nixpkgs#nixos-rebuild&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; switch&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EE0000, #D7BA7D);&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;  -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-flake&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;HOSTNAME&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EE0000, #D7BA7D);&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;  -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-build-host&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;USERNAME&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;@&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;IP&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EE0000, #D7BA7D);&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;  -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-target-host&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;USERNAME&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;@&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;IP&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EE0000, #D7BA7D);&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;  -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-use-remote-sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EE0000, #D7BA7D);&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;  -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-fast&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EE0000, #D7BA7D);&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;  -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-use-substitutes&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EE0000, #D7BA7D);&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;  -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-option&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; builders-use-substitutes&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;this command will build the nixosConfiguration remotely and activate it
as well. This is great, we naturally reduce our dependencies for a
deployment tool. Now we can just create a new &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;nix.dev&#x2F;manual&#x2F;nix&#x2F;2.18&#x2F;command-ref&#x2F;new-cli&#x2F;nix3-run#apps&quot;&gt;flake app&lt;&#x2F;a&gt; and call &lt;code&gt;nix run&lt;&#x2F;code&gt; on our flake:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; inside flake.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; ... rest of the config&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;      homeConfigurations&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CD3131, #F44747);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; forAllHosts&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;my&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;mkHomeConfig&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CD3131, #F44747);&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;      apps&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CD3131, #F44747);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; forAllSystems&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;system&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        deploy&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          type&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;app&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;          program&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;import&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;lib&#x2F;deploy.nix&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            pkgs&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;legacyPackages&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;system&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;            inherit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          }&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;bin&#x2F;deploy&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#CD3131, #F44747);&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#CD3131, #F44747);&quot;&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;and our deploy app is basically a shell script:&lt;&#x2F;p&gt;
&lt;details&gt;
  &lt;summary&gt;lib&#x2F;deploy.nix&lt;&#x2F;summary&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; inside lib&#x2F;deploy.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; pkgs&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; nixpkgs&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;pkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;writeShellScriptBin&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;deploy&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;#39;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;  #!&#x2F;usr&#x2F;bin&#x2F;env bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;  set -e&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;  RAW_HOSTNAME=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EE0000, #D7BA7D);&quot;&gt;&amp;#39;&amp;#39;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;{1:-$(hostname)}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;  HOSTNAME=$(echo &amp;quot;$RAW_HOSTNAME&amp;quot; | cut -d &amp;#39;.&amp;#39; -f 1)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;  REMOTE_BUILD=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EE0000, #D7BA7D);&quot;&gt;&amp;#39;&amp;#39;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;{2:-false}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;  SYSTEM=$(nix eval --raw .#hosts.&amp;quot;$HOSTNAME&amp;quot;.system)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;  USERNAME=$(nix eval --raw .#hosts.&amp;quot;$HOSTNAME&amp;quot;.username)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;  JUST_HOME=$(nix eval --json .#hosts.&amp;quot;$HOSTNAME&amp;quot;.justHome 2&amp;gt;&#x2F;dev&#x2F;null | grep -q &amp;quot;true&amp;quot; &amp;amp;&amp;amp; echo &amp;quot;true&amp;quot; || echo &amp;quot;false&amp;quot;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;  REMOTE_BUILD_ENABLED=$(nix eval --json .#hosts.&amp;quot;$HOSTNAME&amp;quot;.remoteBuild | grep -q &amp;quot;true&amp;quot; &amp;amp;&amp;amp; echo &amp;quot;true&amp;quot; || echo &amp;quot;false&amp;quot;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;  deploy_home() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    local host=$1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    local remote=$2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    echo &amp;quot;Deploying home configuration for $host...&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    if [ &amp;quot;$remote&amp;quot; == &amp;quot;true&amp;quot; ]; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;      ssh &amp;quot;$USERNAME@$IP&amp;quot; &amp;quot;nix run &amp;#39;github:nix-community&#x2F;home-manager&#x2F;master&amp;#39; -- switch --flake &amp;#39;.#$host&amp;#39;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;      nix run github:nix-community&#x2F;home-manager&#x2F;master -- switch --flake .#&amp;quot;$host&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;  if [[ &amp;quot;$REMOTE_BUILD&amp;quot; == &amp;quot;true&amp;quot; &amp;amp;&amp;amp; &amp;quot;$REMOTE_BUILD_ENABLED&amp;quot; == &amp;quot;true&amp;quot; ]]; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    PUBLIC_IP=$(nix eval --raw .#hosts.&amp;quot;$HOSTNAME&amp;quot;.ips.public 2&amp;gt;&#x2F;dev&#x2F;null || echo &amp;quot;&amp;quot;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    PRIVATE_IP=$(nix eval --raw .#hosts.&amp;quot;$HOSTNAME&amp;quot;.ips.private 2&amp;gt;&#x2F;dev&#x2F;null || echo &amp;quot;&amp;quot;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    IP=&amp;quot;$PUBLIC_IP&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    if ! ping -c 1 -W 1 &amp;quot;$IP&amp;quot; &amp;amp;&amp;gt;&#x2F;dev&#x2F;null &amp;amp;&amp;amp; [ -n &amp;quot;$PRIVATE_IP&amp;quot; ]; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;      IP=&amp;quot;$PRIVATE_IP&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    if [ -z &amp;quot;$IP&amp;quot; ]; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;      echo &amp;quot;Error: No IP address available for remote build&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;      exit 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    if [[ &amp;quot;$JUST_HOME&amp;quot; == &amp;quot;true&amp;quot; ]]; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;      deploy_home &amp;quot;$HOSTNAME&amp;quot; true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;      echo &amp;quot;Deploying to $HOSTNAME ($IP) with remote build...&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;      if [[ &amp;quot;$SYSTEM&amp;quot; == *&amp;quot;-linux&amp;quot; ]]; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;        nix run nixpkgs#nixos-rebuild -- switch \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;          --flake .#&amp;quot;$HOSTNAME&amp;quot; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;          --build-host &amp;quot;$USERNAME@$IP&amp;quot; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;          --target-host &amp;quot;$USERNAME@$IP&amp;quot; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;          --use-remote-sudo \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;          --fast \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;          --use-substitutes \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;          --option builders-use-substitutes true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;      else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;        nix run github:lnl7&#x2F;nix-darwin&#x2F;master#darwin-rebuild -- switch \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;          --flake .#&amp;quot;$HOSTNAME&amp;quot; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;          --build-host &amp;quot;$USERNAME@$IP&amp;quot; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;          --target-host &amp;quot;$USERNAME@$IP&amp;quot; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;          --fast&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;      fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;  else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    if [[ &amp;quot;$JUST_HOME&amp;quot; == &amp;quot;true&amp;quot; ]]; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;      deploy_home &amp;quot;$HOSTNAME&amp;quot; false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;      echo &amp;quot;Deploying to $HOSTNAME locally...&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;      if [[ &amp;quot;$SYSTEM&amp;quot; == *&amp;quot;-linux&amp;quot; ]]; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;        sudo nix run nixpkgs#nixos-rebuild -- switch --flake .#&amp;quot;$HOSTNAME&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;      else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;        nix run github:lnl7&#x2F;nix-darwin&#x2F;master#darwin-rebuild -- switch --flake .#&amp;quot;$HOSTNAME&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;      fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;  fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;#39;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;details&gt;
&lt;p&gt;Now we can run commands like:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Deploy to current host&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;nix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; run&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .#deploy&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Deploy to specific host&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;nix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; run&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .#deploy&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; mintaka&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Deploy to specific host with remote build&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;nix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; run&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .#deploy&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; mintaka&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;future&quot;&gt;Future&lt;&#x2F;h2&gt;
&lt;p&gt;I have uploaded these files on my &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;wantguns&#x2F;dotfiles&quot;&gt;github&lt;&#x2F;a&gt;. I
will keep tracking them and hopefully make abstractions for easier syncing if
necessary.&lt;&#x2F;p&gt;
&lt;p&gt;Since we now have a good abstraction for our hosts, I am going to start
using this flake alongside nixos-anywhere and nixos-infect to start
installing nix on my servers. The plan is to onboard them and build a
wireguard mesh, and a K3S cluster. Starting with my Dell Optiplex 3040, &lt;code&gt;mintaka&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>System-Level macOS Configuration with nix-darwin</title>
        <published>2025-03-08T00:00:00+00:00</published>
        <updated>2025-03-08T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Gunwant Jain
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://wantguns.dev/blog/nixdarwin/"/>
        <id>https://wantguns.dev/blog/nixdarwin/</id>
        
        <content type="html" xml:base="https://wantguns.dev/blog/nixdarwin/">&lt;p&gt;Lets expand on our flake from before and also make system level changes
like &lt;code&gt;KeyInputDelay&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;p&gt;This is the new &lt;code&gt;flake.nix&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;details&gt;
  &lt;summary&gt;flake.nix&lt;&#x2F;summary&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  description&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;Home Manager configuration of gunwant.jain1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  inputs&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;url&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;github:nixos&#x2F;nixpkgs&#x2F;nixos-unstable&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    darwin&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        url&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;github:lnl7&#x2F;nix-darwin&#x2F;master&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        inputs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;follows&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    home-manager&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      url&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;github:nix-community&#x2F;home-manager&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      inputs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;follows&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  outputs&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; inputs&lt;&#x2F;span&gt;&lt;span&gt;@&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; self&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; darwin&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; home-manager&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; ...&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;    let&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      system&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;x86_64-darwin&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      pkgs&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;legacyPackages&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;system&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;    in&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      darwinConfigurations&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;lt;hostname&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; darwin&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;darwinSystem&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;        inherit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; system&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        specialArgs&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; inherit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; inputs&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        modules&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;            .&#x2F;configuration.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;            home-manager&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;darwinModules&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;home-manager&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;                home-manager&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;useGlobalPkgs&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;                home-manager&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;useUserPackages&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;                home-manager&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;users&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;lt;username&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt; import&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;home.nix&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;details&gt;
&lt;p&gt;You&#x27;ll notice that we have abstracted the home manager outputs and are
now using them as modules inside the nix-darwin configuration modules.&lt;&#x2F;p&gt;
&lt;p&gt;And here is the &lt;code&gt;configuration.nix&lt;&#x2F;code&gt; module:&lt;&#x2F;p&gt;
&lt;details&gt;
  &lt;summary&gt;configuration.nix&lt;&#x2F;summary&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; config&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; pkgs&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; ...&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  imports&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  nix&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    package&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; pkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;nix&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    settings&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;      &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;extra-experimental-features&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;nix-command&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;flakes&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;config&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;allowUnfree&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  users&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;users&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;lt;username&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    shell&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; pkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;zsh&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    home&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;Users&#x2F;&amp;lt;username&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    packages&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; with&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; pkgs&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;       xh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;       jq&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  homebrew&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    brews&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;     &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;k9s&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;     &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;kubectl&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  system&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;stateVersion&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 6&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  system&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;defaults&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    finder&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      AppleShowAllExtensions&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      ShowPathbar&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      FXEnableExtensionChangeWarning&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; false&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    NSGlobalDomain&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      InitialKeyRepeat&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 10&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      KeyRepeat&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;details&gt;
&lt;h2 id=&quot;file-tree&quot;&gt;File tree&lt;&#x2F;h2&gt;
&lt;p&gt;After making the required changes, this is how my file tree looks like:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;├── flake.nix           ---&amp;gt; Edited&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;├── flake.lock          ---&amp;gt; Edited&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;├── configuration.nix   ---&amp;gt; New&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;├── git&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   ├── config&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   ├── message&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;├── home.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;├── nvim&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   ├── base.lua&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   └── treesitter.lua&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;├── tmux&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   └── tmux.conf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;└── zsh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ├── p10k.zsh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    └── zshrc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;commands&quot;&gt;Commands&lt;&#x2F;h2&gt;
&lt;p&gt;Use &lt;code&gt;darwin-rebuild&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;darwin-rebuild&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; switch&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-flake&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;future&quot;&gt;Future&lt;&#x2F;h2&gt;
&lt;p&gt;With a couple of files, we can now control mostly everything about my
mac host. But we can expand this further.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;deploy-rs&lt;&#x2F;code&gt; allows us to deploy nix profiles to a host machine (using ssh)
and activate them. This is helpful because now we can abstract both
nix-darwin and nixos hosts as just profiles.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Getting Started with Nix Home Manager on macOS</title>
        <published>2025-03-06T00:00:00+00:00</published>
        <updated>2025-03-06T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Gunwant Jain
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://wantguns.dev/blog/homemanager/"/>
        <id>https://wantguns.dev/blog/homemanager/</id>
        
        <content type="html" xml:base="https://wantguns.dev/blog/homemanager/">&lt;p&gt;I am going to start hacking nix code on my macbook first. Home Manager
is a unobstrusive entry-point to the nix world. You need to first
install nix with flakes. Use the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;DeterminateSystems&#x2F;nix-installer&quot;&gt;determinate installer&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Once thats done, create a new directory in your development folder, lets
say &lt;code&gt;nixhome&lt;&#x2F;code&gt;, and create a &lt;code&gt;flake.nix&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;details&gt;
  &lt;summary&gt;flake.nix&lt;&#x2F;summary&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  description&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;Home Manager configuration&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  inputs&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;url&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;github:nixos&#x2F;nixpkgs&#x2F;nixos-unstable&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    home-manager&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      url&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;github:nix-community&#x2F;home-manager&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      inputs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;follows&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;nixpkgs&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  outputs&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; inputs&lt;&#x2F;span&gt;&lt;span&gt;@&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; self&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; home-manager&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; ...&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;    let&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      system&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;x86_64-darwin&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      pkgs&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; nixpkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;legacyPackages&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;system&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;    in&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      homeConfigurations&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;play&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; home-manager&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;homeManagerConfiguration&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;        inherit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt; pkgs&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        modules&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;          .&#x2F;home.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;details&gt;
&lt;p&gt;and a &lt;code&gt;home.nix&lt;&#x2F;code&gt; file:&lt;&#x2F;p&gt;
&lt;details&gt;
  &lt;summary&gt;home.nix&lt;&#x2F;summary&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; config&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; pkgs&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span&gt; ...&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;let&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  toLua&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; str&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EE0000, #D7BA7D);&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;lua &amp;lt;&amp;lt; EOF&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EE0000, #D7BA7D);&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;str&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EE0000, #D7BA7D);&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;EOF&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  toLuaFile&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; file&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EE0000, #D7BA7D);&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;lua &amp;lt;&amp;lt; EOF&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EE0000, #D7BA7D);&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;builtins&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;readFile&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; file&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EE0000, #D7BA7D);&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;EOF&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  fromGitHub&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;      ref&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;      repo&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;      sha256&lt;&#x2F;span&gt;&lt;span&gt; ?&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;fakeSha256&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;    pkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;vimUtils&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;buildVimPlugin&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      pname&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;strings&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;sanitizeDerivationName&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; repo&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      version&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; ref&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      src&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; pkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;fetchFromGitHub&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        owner&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;strings&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;elemAt&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;strings&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;splitString&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; repo&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        repo&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;strings&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;elemAt&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;lib&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;strings&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;splitString&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; repo&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        rev&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; ref&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        sha256&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; sha256&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  fakeVimPlugin&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; pkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;runCommand&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;fakeVimPlugin&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;mkdir $out&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;in&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  nixpkgs&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    config&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      allowUnfree&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      allowUnfreePredicate&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;_&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  home&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;username&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;lt;username&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  home&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;homeDirectory&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;Users&#x2F;&amp;lt;username&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  home&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;stateVersion&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;24.11&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  home&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;packages&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;    pkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;ripgrep&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;    pkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;neofetch&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  home&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;file&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;.p10k.zsh&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;source&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;zsh&#x2F;p10k.zsh&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;.config&#x2F;git&#x2F;message&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;source&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;git&#x2F;message&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  fonts&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;fontconfig&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  programs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;home-manager&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  programs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;zsh&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    syntaxHighlighting&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    autosuggestion&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    enableCompletion&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    defaultKeymap&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;viins&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    completionInit&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;#39;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;autoload -U compinit &amp;amp;&amp;amp; compinit -u&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;#39;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    history&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      append&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      extended&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      size&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 10000&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;      save&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 1000000&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    initExtraFirst&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; builtins&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;readFile&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;zsh&#x2F;zshrc&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    plugins&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        name&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;zsh-powerlevel10k&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        src&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;${&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;pkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;zsh-powerlevel10k&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;share&#x2F;zsh-powerlevel10k&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        file&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;powerlevel10k.zsh-theme&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  programs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;tmux&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    extraConfig&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; builtins&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;readFile&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;tmux&#x2F;tmux.conf&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  programs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;git&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    extraConfig&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; builtins&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;readFile&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;git&#x2F;config&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    delta&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;  programs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;neovim&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    defaultEditor&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    viAlias&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    vimAlias&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    vimdiffAlias&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    plugins&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; with&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; pkgs&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;vimPlugins&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        plugin&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; fakeVimPlugin&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        config&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; toLuaFile&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;nvim&#x2F;base.lua&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;      plenary-nvim&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;      which-key-nvim&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;      copilot-vim&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        plugin&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; nvim-treesitter&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;withAllGrammars&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        config&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; toLuaFile&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&#x2F;nvim&#x2F;treesitter.lua&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        plugin&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;          fromGitHub&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            ref&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;HEAD&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            repo&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;bluz71&#x2F;vim-moonfly-colors&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;            sha256&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;c5fxaT8Bc5MzOjJsuU95K9yzTpGqj&#x2F;7QP4GuLfsY4VE=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        )&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;        config&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;colorscheme moonfly&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;      #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Redacted list of plugins ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#E50000, #9CDCFE);&quot;&gt;    extraPackages&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; with&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; pkgs&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;      gopls&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;      pyright&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;details&gt;
&lt;h3 id=&quot;neovim&quot;&gt;Neovim&lt;&#x2F;h3&gt;
&lt;p&gt;In the &lt;code&gt;home.nix&lt;&#x2F;code&gt; file, you can see that we defined three functions which
are used to activate three types of vim plugins:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Ones which do not need any further configuration, like plenary&lt;&#x2F;li&gt;
&lt;li&gt;Ones which do need a lua config to function well, like treesitter&lt;&#x2F;li&gt;
&lt;li&gt;Ones which do not exist on the nixpkg store currently&lt;&#x2F;li&gt;
&lt;li&gt;Also I wanted to append these configs in the order of the plugins, and
&lt;code&gt;programs.neovim.extraconfig&lt;&#x2F;code&gt; added the config at the end of the .vim
config file. So i created a fakeVimPlugin and injected a base config in
order.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;other-things&quot;&gt;Other things&lt;&#x2F;h3&gt;
&lt;p&gt;Home manager has a rich set of options to explore. I am currently using also
aerc and alacritty through it.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;file-tree&quot;&gt;File tree&lt;&#x2F;h2&gt;
&lt;p&gt;This is the final state of my flake folder:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;├── flake.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;├── flake.lock&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;├── git&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   ├── config&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   ├── message&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;├── home.nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;├── nvim&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   ├── base.lua&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   └── treesitter.lua&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;├── tmux&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   └── tmux.conf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;└── zsh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ├── p10k.zsh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    └── zshrc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;commands&quot;&gt;Commands&lt;&#x2F;h2&gt;
&lt;p&gt;To apply this config, you can either just build it with the flake as an
app or just use the binary in a nix-shell:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;home-manager&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; switch&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-flake&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .#play&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Home manager maintains a list of generations and adds one whenever you
switch to a new nix output. You can easily rollback on switches.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;future&quot;&gt;Future&lt;&#x2F;h2&gt;
&lt;p&gt;Home manager is nice and unobtrusive piece of software which is fine for
setting up on foreign hosts. Let&#x27;s move ahead and integrate home-manager
with &lt;code&gt;nix-darwin&lt;&#x2F;code&gt; to also make system level changes.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Setting up my homelab and cloud with Nix</title>
        <published>2025-03-04T00:00:00+00:00</published>
        <updated>2025-03-04T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Gunwant Jain
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://wantguns.dev/blog/yakshaving/"/>
        <id>https://wantguns.dev/blog/yakshaving/</id>
        
        <content type="html" xml:base="https://wantguns.dev/blog/yakshaving/">&lt;p&gt;I have been maintaining a set of cloud servers, for the purpose of
selfhosting a ton of software, VPNs, and random experimentation.
Recently, I bought a Dell Optiplex 3040 for Rs. 5000 ($60), and I am
planning to revamp all my scattered scripts and make orchestration easy
for a one person team.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;tradeoffs&quot;&gt;Tradeoffs&lt;&#x2F;h3&gt;
&lt;p&gt;I have a pragramtic approach to selfhosting. Until now, I have only used
traefik 2.0, docker-compose, caddy. I do have lots of services running
and I wanted an orchestration solution which is flexible. Web apps are
mostly running on cloud native technology nowadays, and so Kubernetes
stood out easily.&lt;&#x2F;p&gt;
&lt;p&gt;As a selfhoster, I can foresee changes in infrastructure less often, and
so I don&#x27;t exactly want to treat my servers as cattle. I want to be able
to audit everything and easily onboard new hosts though. Ansible is a
good option, but it feels like a leaky abstraction for IaC. I am going
to go yolo on nix and see how far it can take me.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;concepts&quot;&gt;Concepts&lt;&#x2F;h3&gt;
&lt;p&gt;I have had multiple scattered thoughts on what designs fits best for my
needs, and I have realised:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;a terminal session is my forte, I want to be able to replicate my
dotfiles on new hosts.&lt;&#x2F;li&gt;
&lt;li&gt;I am fine with running NixOS as my userland. I can also run nix-darwin
on Macbooks.&lt;&#x2F;li&gt;
&lt;li&gt;I am going to hand over all the hardware and os-level configuration to
Nix, and will use a deployment tool like deploy-rs.&lt;&#x2F;li&gt;
&lt;li&gt;I want all of my nodes to form a mesh, preferrably using wireguard,
and preferrably not using proprietary tools like Tailscale, need to
make a tradeoff for that.&lt;&#x2F;li&gt;
&lt;li&gt;I want to orchestrate selfhosted services over different nodes, with
affinities and selectors and resource constraints. I&#x27;ll use
Kubernetes, or K3s, more accurately to acheive this.&lt;&#x2F;li&gt;
&lt;li&gt;I also like Gitops, mostly for the auditing and single source of truth
features. Planning to use FluxCD and Github for gitops.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;With a setup like this, I will be able to setup new servers and handle
any sort of load pretty quickly. The good thing with nix is that we can
also have tiers based on how much control I want to give to new
hardware, I might just want my normal terminal session on a contract
work&#x27;s server.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;dev-logs&quot;&gt;Dev logs&lt;&#x2F;h3&gt;
&lt;p&gt;I am going to start blogging about my journey, here is timeline i&#x27;ll
keep updating:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot; checked=&quot;&quot;&#x2F;&gt;
&lt;a href=&quot;&#x2F;homemanager&quot;&gt;Home Manager&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot; checked=&quot;&quot;&#x2F;&gt;
&lt;a href=&quot;&#x2F;nixdarwin&quot;&gt;Nix Darwin&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot; checked=&quot;&quot;&#x2F;&gt;
&lt;a href=&quot;&#x2F;nixmultihost&quot;&gt;Single Flake Multiple Hosts&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;files available on &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;wantguns&#x2F;dotfiles&quot;&gt;github&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot; checked=&quot;&quot;&#x2F;&gt;
&lt;a href=&quot;&#x2F;nixos-anywhere&quot;&gt;Setting up Mintaka and Bellatrix&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Setting up a Wireguard network&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Building LMDB JNI for Jetson Nano</title>
        <published>2022-02-20T00:00:00+00:00</published>
        <updated>2022-02-20T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Gunwant Jain
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://wantguns.dev/blog/lmdb-jni-jetson-nano/"/>
        <id>https://wantguns.dev/blog/lmdb-jni-jetson-nano/</id>
        
        <content type="html" xml:base="https://wantguns.dev/blog/lmdb-jni-jetson-nano/">&lt;h2 id=&quot;building&quot;&gt;Building&lt;&#x2F;h2&gt;
&lt;p&gt;Once again, I hate to use docker for automating VM purposes, but I acknowledge
it as an ad-hoc method for this instance.&lt;&#x2F;p&gt;
&lt;p&gt;We will be compiling natively for arm64 in a qemu image which is running
inside a docker container.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;docker&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Import info for 64-bit Qemu based build&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;FROM&lt;&#x2F;span&gt;&lt;span&gt; balenalib&#x2F;raspberrypi4-64-python:latest-bullseye-build&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;ARG&lt;&#x2F;span&gt;&lt;span&gt; LMDB_REPO=https:&#x2F;&#x2F;github.com&#x2F;deephacks&#x2F;lmdbjni&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;ARG&lt;&#x2F;span&gt;&lt;span&gt; LMDB_REPO_BRANCH=master&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Enforces cross-compilation through Qemu.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;RUN&lt;&#x2F;span&gt;&lt;span&gt; [ &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;cross-build-start&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;RUN&lt;&#x2F;span&gt;&lt;span&gt; sudo apt update -y &amp;amp;&amp;amp; sudo apt upgrade -y&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;RUN&lt;&#x2F;span&gt;&lt;span&gt; sudo apt install -y \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    build-essential \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    git \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    tar \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    default-jdk \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    automake \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    libtool \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    maven \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    neovim&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Prepare LMDB-JNI Repo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;WORKDIR&lt;&#x2F;span&gt;&lt;span&gt; &#x2F;code&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;RUN&lt;&#x2F;span&gt;&lt;span&gt; git clone --single-branch --branch ${LMDB_REPO_BRANCH} --recursive ${LMDB_REPO} lmdb&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Start build&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;RUN&lt;&#x2F;span&gt;&lt;span&gt; cd lmdb &amp;amp;&amp;amp; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    sed pom.xml -i -e &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;s&#x2F;&amp;lt;hawtjni-version&amp;gt;.*&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;\&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;hawtjni-version&amp;gt;&#x2F;&amp;lt;hawtjni-version&amp;gt;1.15&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;\&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;hawtjni-version&amp;gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; &amp;amp;&amp;amp; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    mvn clean install -P linux64 -Dhttps.protocols=TLSv1.2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Build Output&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;RUN&lt;&#x2F;span&gt;&lt;span&gt; find . | grep *.jar*&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;VOLUME&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;.&#x2F;artifacts&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;RUN&lt;&#x2F;span&gt;&lt;span&gt; [ &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;cross-build-end&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; ]%&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;pitfalls&quot;&gt;Pitfalls&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;ssl&quot;&gt;SSL&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;groovy&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SSL&lt;&#x2F;span&gt;&lt;span&gt; peer&lt;&#x2F;span&gt;&lt;span&gt; shut&lt;&#x2F;span&gt;&lt;span&gt; down&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; incorrectly&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;Fix&lt;&#x2F;strong&gt;: use the &lt;code&gt;-Dhttps.protocols=TLSv1.2&lt;&#x2F;code&gt; flag when invoking maven.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;hawtjni&quot;&gt;Hawtjni&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;groovy&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;       |   ^~~~~~~~~~&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt; src&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;hawtjni&lt;&#x2F;span&gt;&lt;span&gt;-&lt;&#x2F;span&gt;&lt;span&gt;callback&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;c&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;479&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;3&lt;&#x2F;span&gt;&lt;span&gt;: &lt;&#x2F;span&gt;&lt;span&gt;error&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt; initializer element is not constant&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;   479&lt;&#x2F;span&gt;&lt;span&gt; |   &lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;jintLong&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;FN&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;127&lt;&#x2F;span&gt;&lt;span&gt;, args&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;, \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;       |   ^&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt; src&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;hawtjni&lt;&#x2F;span&gt;&lt;span&gt;-&lt;&#x2F;span&gt;&lt;span&gt;callback&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;c&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;498&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;3&lt;&#x2F;span&gt;&lt;span&gt;: &lt;&#x2F;span&gt;&lt;span&gt;note&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt; in&lt;&#x2F;span&gt;&lt;span&gt; expansion of macro ‘&lt;&#x2F;span&gt;&lt;span&gt;FN_A_BLOCK&lt;&#x2F;span&gt;&lt;span&gt;’&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;   498&lt;&#x2F;span&gt;&lt;span&gt; |   &lt;&#x2F;span&gt;&lt;span&gt;FN_A_BLOCK&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;12&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;       |   ^~~~~~~~~~&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt; src&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;hawtjni&lt;&#x2F;span&gt;&lt;span&gt;-&lt;&#x2F;span&gt;&lt;span&gt;callback&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;c&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;479&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;3&lt;&#x2F;span&gt;&lt;span&gt;: &lt;&#x2F;span&gt;&lt;span&gt;note&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span&gt;near initialization &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#AF00DB, #C586C0);&quot;&gt;for&lt;&#x2F;span&gt;&lt;span&gt; ‘fnx_array&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;12&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;127&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;’&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;   479&lt;&#x2F;span&gt;&lt;span&gt; |   &lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;jintLong&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;FN&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;127&lt;&#x2F;span&gt;&lt;span&gt;, args&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;, \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;       |   ^&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt; src&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;hawtjni&lt;&#x2F;span&gt;&lt;span&gt;-&lt;&#x2F;span&gt;&lt;span&gt;callback&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;c&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;498&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;3&lt;&#x2F;span&gt;&lt;span&gt;: &lt;&#x2F;span&gt;&lt;span&gt;note&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt; in&lt;&#x2F;span&gt;&lt;span&gt; expansion of macro ‘&lt;&#x2F;span&gt;&lt;span&gt;FN_A_BLOCK&lt;&#x2F;span&gt;&lt;span&gt;’&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;   498&lt;&#x2F;span&gt;&lt;span&gt; |   &lt;&#x2F;span&gt;&lt;span&gt;FN_A_BLOCK&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;12&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt;       |   ^~~~~~~~~~&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt; make&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt; *&lt;&#x2F;span&gt;&lt;span&gt;*&lt;&#x2F;span&gt;&lt;span&gt;*&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#267F99, #4EC9B0);&quot;&gt;Makefile&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;410&lt;&#x2F;span&gt;&lt;span&gt;: hawtjni&lt;&#x2F;span&gt;&lt;span&gt;-&lt;&#x2F;span&gt;&lt;span&gt;callback&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;lo&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#267F99, #4EC9B0);&quot;&gt; Error&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt; rc&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt; --&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#267F99, #4EC9B0);&quot;&gt; Reactor&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#267F99, #4EC9B0);&quot;&gt; Summary&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#AF00DB, #C586C0);&quot;&gt; for&lt;&#x2F;span&gt;&lt;span&gt; lmdbjni&lt;&#x2F;span&gt;&lt;span&gt;-&lt;&#x2F;span&gt;&lt;span&gt;project &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;0.4&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;.8&lt;&#x2F;span&gt;&lt;span&gt;-&lt;&#x2F;span&gt;&lt;span&gt;SNAPSHOT&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt; lmdbjni&lt;&#x2F;span&gt;&lt;span&gt;-&lt;&#x2F;span&gt;&lt;span&gt;project &lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt; SUCCESS&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;02&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;08&lt;&#x2F;span&gt;&lt;span&gt; min&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt; lmdbjni &lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt; SUCCESS&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;04&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;50&lt;&#x2F;span&gt;&lt;span&gt; min&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt; lmdbjni&lt;&#x2F;span&gt;&lt;span&gt;-&lt;&#x2F;span&gt;&lt;span&gt;linux64 &lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt;..&lt;&#x2F;span&gt;&lt;span&gt; FAILURE&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;01&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;50&lt;&#x2F;span&gt;&lt;span&gt; min&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt; --&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt; BUILD&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; FAILURE&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt; --&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#267F99, #4EC9B0);&quot;&gt; Total&lt;&#x2F;span&gt;&lt;span&gt; time&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;  08&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;49&lt;&#x2F;span&gt;&lt;span&gt; min&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#267F99, #4EC9B0);&quot;&gt; Finished&lt;&#x2F;span&gt;&lt;span&gt; at&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 2022&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;-02&lt;&#x2F;span&gt;&lt;span&gt;-&lt;&#x2F;span&gt;&lt;span&gt;21T09&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;40&lt;&#x2F;span&gt;&lt;span&gt;:07Z&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;INFO&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span&gt; --&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;span&gt;--&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span&gt;ERROR&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#267F99, #4EC9B0);&quot;&gt; Failed&lt;&#x2F;span&gt;&lt;span&gt; to execute goal org&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;fusesource&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;hawtjni&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt;maven&lt;&#x2F;span&gt;&lt;span&gt;-&lt;&#x2F;span&gt;&lt;span&gt;hawtjni&lt;&#x2F;span&gt;&lt;span&gt;-&lt;&#x2F;span&gt;&lt;span&gt;plugin&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;1.11&lt;&#x2F;span&gt;&lt;span&gt;:build &lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#AF00DB, #C586C0);&quot;&gt;default&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt; on project lmdbjni&lt;&#x2F;span&gt;&lt;span&gt;-&lt;&#x2F;span&gt;&lt;span&gt;linux64&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span&gt; build &lt;&#x2F;span&gt;&lt;span&gt;failed&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#267F99, #4EC9B0);&quot;&gt; org.apache.maven.plugin.MojoExecutionException&lt;&#x2F;span&gt;&lt;span&gt;: make based build failed with exit &lt;&#x2F;span&gt;&lt;span&gt;code&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#267F99, #4EC9B0);&quot;&gt;Help&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The error arises due to hardcoding a macro defining the system
architecture to &lt;code&gt;__x86_64__&lt;&#x2F;code&gt; instead of using something more generic.&lt;&#x2F;p&gt;
&lt;p&gt;This &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;fusesource&#x2F;hawtjni&#x2F;pull&#x2F;20&quot;&gt;pull request&lt;&#x2F;a&gt; fixes
the bug, but it got merged into hawtjni &lt;code&gt;v1.15&lt;&#x2F;code&gt; and LMDB-jni uses
hawtjni &lt;code&gt;v1.11&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Fix&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Apply basic substitution&lt;sup class=&quot;footnote-reference&quot;&gt;&lt;a href=&quot;#1&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;sed&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; pom.xml&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;i&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;e&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;s&#x2F;&amp;lt;hawtjni-version&amp;gt;.*&amp;lt;\&#x2F;hawtjni-version&amp;gt;&#x2F;&amp;lt;hawtjni-version&amp;gt;1.15&amp;lt;\&#x2F;hawtjni-version&amp;gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;div class=&quot;footnote-definition&quot; id=&quot;1&quot;&gt;&lt;sup class=&quot;footnote-definition-label&quot;&gt;1&lt;&#x2F;sup&gt;
&lt;p&gt;We could have used a more recent version, but &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;mvnrepository.com&#x2F;artifact&#x2F;org.fusesource.hawtjni&quot;&gt;org.fusesource.hawtjni&lt;&#x2F;a&gt; changed the package name &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;mvnrepository.com&#x2F;artifact&#x2F;org.fusesource.hawtjni&#x2F;hawtjni-maven-plugin&quot;&gt;after &lt;code&gt;v1.15&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; and would therefore require more work. tldr; i am lazy.&lt;&#x2F;p&gt;
&lt;&#x2F;div&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Building ONNX Runtime for Jetson Nano</title>
        <published>2022-02-20T00:00:00+00:00</published>
        <updated>2022-02-20T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Gunwant Jain
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://wantguns.dev/blog/onnxruntime-jetson-nano/"/>
        <id>https://wantguns.dev/blog/onnxruntime-jetson-nano/</id>
        
        <content type="html" xml:base="https://wantguns.dev/blog/onnxruntime-jetson-nano/">&lt;h2 id=&quot;building&quot;&gt;Building&lt;&#x2F;h2&gt;
&lt;p&gt;I hate to use docker for automating VM purposes, but I acknowledge it as
an ad-hoc method for this instance.&lt;&#x2F;p&gt;
&lt;p&gt;We will be compiling natively for arm64 in a qemu image which is running
inside a docker container.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;dockerfile&quot;&gt;Dockerfile&lt;&#x2F;h4&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;docker&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Import info for 64-bit Qemu based build&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; There are also raspberry pi 4 and 64-bit images available so adjust as required&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;FROM&lt;&#x2F;span&gt;&lt;span&gt; balenalib&#x2F;raspberrypi4-64-python:latest-bullseye-build&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;ARG&lt;&#x2F;span&gt;&lt;span&gt; ONNXRUNTIME_REPO=https:&#x2F;&#x2F;github.com&#x2F;Microsoft&#x2F;onnxruntime&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;ARG&lt;&#x2F;span&gt;&lt;span&gt; ONNXRUNTIME_SERVER_BRANCH=master&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Enforces cross-compilation through Qemu.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;RUN&lt;&#x2F;span&gt;&lt;span&gt; [ &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;cross-build-start&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;RUN&lt;&#x2F;span&gt;&lt;span&gt; sudo apt update -y &amp;amp;&amp;amp; sudo apt upgrade -y&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;RUN&lt;&#x2F;span&gt;&lt;span&gt; sudo apt install -y \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    sudo \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    build-essential \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    curl \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    libcurl4-openssl-dev \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    libssl-dev \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    wget \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    python3 \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    python3-dev \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    git \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    tar \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    libatlas-base-dev \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    default-jdk \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    unzip \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    neovim \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    cmake \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    openjdk-11-jdk&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;RUN&lt;&#x2F;span&gt;&lt;span&gt; wget --no-verbose --output-document=gradle.zip &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;https:&#x2F;&#x2F;services.gradle.org&#x2F;distributions&#x2F;gradle-6.3-bin.zip&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; &amp;amp;&amp;amp;\&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    echo &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;Installing Gradle&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; &amp;amp;&amp;amp;\&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    unzip gradle.zip &amp;amp;&amp;amp;\&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    rm gradle.zip &amp;amp;&amp;amp;\&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    mv &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;gradle-6.3&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;opt&#x2F;gradle&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; &amp;amp;&amp;amp;\&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ln --symbolic &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;opt&#x2F;gradle&#x2F;bin&#x2F;gradle&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; &#x2F;usr&#x2F;bin&#x2F;gradle&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Set up build args&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;ARG&lt;&#x2F;span&gt;&lt;span&gt; BUILDTYPE=MinSizeRel&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; if doing a 32-bit build change &amp;#39;--arm64&amp;#39; to &amp;#39;--arm&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;ARG&lt;&#x2F;span&gt;&lt;span&gt; BUILDARGS=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;--config ${BUILDTYPE} --arm64&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Prepare onnxruntime Repo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;WORKDIR&lt;&#x2F;span&gt;&lt;span&gt; &#x2F;code&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;RUN&lt;&#x2F;span&gt;&lt;span&gt; git clone --single-branch --branch ${ONNXRUNTIME_SERVER_BRANCH} --recursive ${ONNXRUNTIME_REPO} onnxruntime&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Build ORT including the shared lib and python bindings&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;WORKDIR&lt;&#x2F;span&gt;&lt;span&gt; &#x2F;code&#x2F;onnxruntime&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;RUN&lt;&#x2F;span&gt;&lt;span&gt; .&#x2F;build.sh --use_openmp ${BUILDARGS} --update --build --build_shared_lib --build_java --parallel \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    --cmake_extra_defines JAVA_AWT_LIBRARY=NotNeeded JAVA_JVM_LIBRARY=NotNeeded&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Build Output&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;RUN&lt;&#x2F;span&gt;&lt;span&gt; ls -l &#x2F;code&#x2F;onnxruntime&#x2F;build&#x2F;Linux&#x2F;${BUILDTYPE}&#x2F;*.so*&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;VOLUME&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;.&#x2F;artifacts&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Uncomment if building python wheels&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; RUN ls -l &#x2F;code&#x2F;onnxruntime&#x2F;build&#x2F;Linux&#x2F;${BUILDTYPE}&#x2F;dist&#x2F;*.whl&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;RUN&lt;&#x2F;span&gt;&lt;span&gt; [ &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;cross-build-end&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; ]%&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;pitfalls&quot;&gt;Pitfalls&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;jni&quot;&gt;JNI&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;cmake&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Could &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;NOT&lt;&#x2F;span&gt;&lt;span&gt; find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;Fix&lt;&#x2F;strong&gt;: set JAVA_AWT_LIBRARY, JAVA_JVM_LIBRARY to not needed.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;c-version&quot;&gt;C++ Version&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;cmake&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;In file included from &#x2F;code&#x2F;onnxruntime&#x2F;onnxruntime&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;test&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;onnx&#x2F;tensorprotoutils.cc:15:0:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;code&#x2F;onnxruntime&#x2F;include&#x2F;onnxruntime&#x2F;core&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;framework&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;data_types.h: In static member function ‘static const onnxruntime::DataTypeImpl* onnxruntime::data_types_internal::OptionalTypeHelper::GetElemType()’:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;code&#x2F;onnxruntime&#x2F;include&#x2F;onnxruntime&#x2F;core&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;framework&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;data_types.h:427:8: error: expected ‘(’ before ‘constexpr’&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;     if&lt;&#x2F;span&gt;&lt;span&gt; constexpr (std::is_same&amp;lt;T, Tensor&amp;gt;::&lt;&#x2F;span&gt;&lt;span&gt;value&lt;&#x2F;span&gt;&lt;span&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        ^~~~~~~~~&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;code&#x2F;onnxruntime&#x2F;include&#x2F;onnxruntime&#x2F;core&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;framework&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;data_types.h:429:7: error: ‘else’ without a previous ‘if’&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;     } else {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ^~~~&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;Fix&lt;&#x2F;strong&gt;: GCC Version not up to date, use gcc 7+.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>IPC between Termux and Other Android Apps using ZMQ</title>
        <published>2022-01-29T00:00:00+00:00</published>
        <updated>2022-01-29T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Gunwant Jain
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://wantguns.dev/blog/ipc-on-termux/"/>
        <id>https://wantguns.dev/blog/ipc-on-termux/</id>
        
        <content type="html" xml:base="https://wantguns.dev/blog/ipc-on-termux/">&lt;h2 id=&quot;preface&quot;&gt;Preface&lt;&#x2F;h2&gt;
&lt;p&gt;At FlowDrive, we do not have the luxury of travelling heavy. Everything
has to be the fastest it can, every millisecond counts in a single loop.
Which is why we turned to ZeroMQ for handling all the networking between
different services. ZeroMQ is battle-tested, extremely fast and supports
a whole variety of platforms.&lt;&#x2F;p&gt;
&lt;p&gt;ZMQ has a Java implementation,
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;zeromq&#x2F;jeromq&quot;&gt;JeroMQ&lt;&#x2F;a&gt; which is a complete rewrite
of ZMQ in Java. It would be our first choice, but it does not support
many protocols due to their lack of implementations in Java, and IPC is
one of it.&lt;&#x2F;p&gt;
&lt;p&gt;But as justified earlier, we could not afford to have our messages go
through the entire TCP stack, IPCs are just simpler and much faster.&lt;&#x2F;p&gt;
&lt;p&gt;Fortunately, there exists &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;zeromq&#x2F;jzmq%20&quot;&gt;JZMQ&lt;&#x2F;a&gt; ,
the Java bindings for libzmq. I gotta mention that using it on our apps
introduced more complexity, due to lack of packages for different
architectures. We made it work though, by building it ourselves, and
cross-compiling it for whatever architectures we needed to support.&lt;&#x2F;p&gt;
&lt;p&gt;To make sure that the reader follows the context, I have to explain the
environment FlowPilot works in.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;termux&quot;&gt;Termux&lt;&#x2F;h2&gt;
&lt;p&gt;Not everything we write is in Java. Some services can have the liberty to be
written in much slower languages like Python. We run those services inside
Termux, an Android app which gives us a unix-like userland on Android. One of
the key softwares I worked with was an init-system &#x2F; process-manager for
FlowPilot -- &lt;code&gt;FlowInit&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;FlowInit is written in Python, and therefore has to start in Termux. FlowInit
communicates with FlowPilot over Pub&#x2F;Sub and Req&#x2F;Rep. Some communications are
sensitive and making them over TCP would increase the attack vector
substantially. This was the perfect time to utilise IPC.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;ipc-b-w-termux-and-android&quot;&gt;IPC b&#x2F;w Termux and Android&lt;&#x2F;h3&gt;
&lt;p&gt;I mounted the Android directories on the termux land and binded a ZMQ
REP socket on a shared path between Android and Termux.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;def&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt; wait_for_green_flag&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;    &amp;quot;&amp;quot;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;Waits for a ready signal from javaland to start FlowInit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&amp;quot;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    context&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; zmq&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;Context&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    socket&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; context&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;socket&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;zmq&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;REP&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    socket&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;bind&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;ipc:&#x2F;&#x2F;&#x2F;data&#x2F;data&#x2F;com.termux&#x2F;files&#x2F;home&#x2F;storage&#x2F;shared&#x2F;Documents&#x2F;houston&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#AF00DB, #C586C0);&quot;&gt;    while&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; True&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;        #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; This is asynchronous, so sleeping doesn&amp;#39;t matter as long as an&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;        #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; infinite loop is running&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        time&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;sleep&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;Config&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;FREQUENCY&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;        #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Wait on getting a flag, then send an ACK and initiate flowinit&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        flag&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span&gt; socket&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;recv_string&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#AF00DB, #C586C0);&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span&gt; flag&lt;&#x2F;span&gt;&lt;span&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;green_flag&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            socket&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span&gt;send_string&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;ACK&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#AF00DB, #C586C0);&quot;&gt;            break&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;But I faced with this unusual error:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;Traceback&lt;&#x2F;span&gt;&lt;span&gt; (most&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; recent&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; call&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; last&lt;&#x2F;span&gt;&lt;span&gt;):&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;  File&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;data&#x2F;data&#x2F;com.termux&#x2F;files&#x2F;home&#x2F;dev&#x2F;flowinit&#x2F;venv&#x2F;bin&#x2F;flowinit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; line&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; 33,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;modul&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;    sys.exit(load_entry_point(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;flowinit==0.1.0&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;console_scripts&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;flowinit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)(&lt;&#x2F;span&gt;&lt;span&gt;))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;  File&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;data&#x2F;data&#x2F;com.termux&#x2F;files&#x2F;home&#x2F;dev&#x2F;flowinit&#x2F;venv&#x2F;lib&#x2F;python3.10&#x2F;site-packages&#x2F;flowinit-0.1.0-py3.10.egg&#x2F;flowinit&#x2F;flowinit.py&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; line&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; 132,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; in&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; main&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;    wait_for_green_flag&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;  File&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;data&#x2F;data&#x2F;com.termux&#x2F;files&#x2F;home&#x2F;dev&#x2F;flowinit&#x2F;venv&#x2F;lib&#x2F;python3.10&#x2F;site-packages&#x2F;flowinit-0.1.0-py3.10.egg&#x2F;flowinit&#x2F;flowinit.py&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; line&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; 58,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; in&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; wait_for_green_flag&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;    socket.bind(HOST&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;  File&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;data&#x2F;data&#x2F;com.termux&#x2F;files&#x2F;usr&#x2F;lib&#x2F;python3.10&#x2F;site-packages&#x2F;zmq&#x2F;sugar&#x2F;socket.py&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; line&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; 208,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; in&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; bind&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;    super&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span&gt;.bind(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;addr&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;  File&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;zmq&#x2F;backend&#x2F;cython&#x2F;socket.pyx&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; line&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; 540,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; in&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; zmq.backend.cython.socket.Socket.bind&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;  File&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;zmq&#x2F;backend&#x2F;cython&#x2F;checkrc.pxd&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; line&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; 28,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; in&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; zmq.backend.cython.checkrc._check_rc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;zmq.error.ZMQError:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; Invalid&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; argument&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;make:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; *&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;*&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;*&lt;&#x2F;span&gt;&lt;span&gt; [Makefile:30:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; run]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; Error&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;I cross-checked with the PyZMQ repository, this error was not explicitly
defined.&lt;&#x2F;p&gt;
&lt;p&gt;Then I checked with the libzmq codebase, this error was again not
explicitly defined.&lt;&#x2F;p&gt;
&lt;p&gt;Finally I went on to systrace&#x27;ing this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;unlinkat(AT_FDCWD,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;&#x2F;data&#x2F;data&#x2F;com.termux&#x2F;files&#x2F;home&#x2F;storage&#x2F;shared&#x2F;Documents&#x2F;houston&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;) = -1 ENOENT (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;No&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; such&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; file&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; or&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; directory&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;socket(AF_UNIX,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; SOCK_STREAM,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;)         = 13&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;fcntl(13,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; F_SETFD,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; FD_CLOEXEC&lt;&#x2F;span&gt;&lt;span&gt;)          = 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;bind(13,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; {sa_family=AF_UNIX,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; sun_path=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&#x2F;data&#x2F;data&#x2F;com.termux&#x2F;files&#x2F;home&#x2F;storage&#x2F;shared&#x2F;Documents&#x2F;houston&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;},&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 67&lt;&#x2F;span&gt;&lt;span&gt;) = -1 EINVAL (&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;Invalid&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; argument&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;close(13&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The actual error was arising from the &lt;code&gt;bind&lt;&#x2F;code&gt; syscall. Onto reading the
manpage of bind:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ERRORS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       EINVAL addrlen is wrong, or addr is not a valid address for this&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              socket&amp;#39;s domain.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;But as clearly shown in the strace log, the &lt;code&gt;sun_path&lt;&#x2F;code&gt; is well under 104
chars. Clearly some other goof was at play here. I tried this again
after setting my SELinux to permissive, but the error still came up.&lt;br &#x2F;&gt;
Till date I have not realised what was wrong with the path I provided
for an IPC socket. But all evidence points to something wrong (maybe for
the sake of security) on how android symlinks directories &lt;sup class=&quot;footnote-reference&quot;&gt;&lt;a href=&quot;#first&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;&lt;&#x2F;p&gt;
&lt;p&gt;After some more research on Unix Domain Sockets, I came across this
paper &lt;sup class=&quot;footnote-reference&quot;&gt;&lt;a href=&quot;#second&quot;&gt;2&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt; which has been now removed from clearnet, but the
WayBack machine has 1 copy.&lt;&#x2F;p&gt;
&lt;p&gt;I learned more about IPC on Linux, and came across &lt;strong&gt;Abstract Sockets.&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;abstract-sockets&quot;&gt;Abstract Sockets&lt;&#x2F;h2&gt;
&lt;p&gt;Whenever you want to create sockets for IPC, you have two options on
Linux --&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Filesystem namespace&lt;br &#x2F;&gt;
An address in this namespace is associated with a file on the
filesystem. When the server binds to an address (pathname), a socket
file is automatically created.&lt;br &#x2F;&gt;
The format for a Filesystem namespaced socket is simple:
&lt;code&gt;ipc:&#x2F;&#x2F;&#x2F;path&#x2F;to&#x2F;some&#x2F;file&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Abstract namespace&lt;br &#x2F;&gt;
Abstractly namespaced address are neat. Addresses under this namespace
are actually not associated to a file on the filesystem. Instead they
are created under &lt;code&gt;&#x2F;proc&#x2F;net&#x2F;unix&#x2F;&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;An Abstract socket address is distinguished from a Filesystem socket by
setting &lt;code&gt;sun_path[0]&lt;&#x2F;code&gt; to a null byte &lt;code&gt;\0&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Since any form of thin virtualisation like chroot, proot, whatever
Termux does, bind-mount the &lt;code&gt;&#x2F;dev&lt;&#x2F;code&gt; , &lt;code&gt;&#x2F;sys&lt;&#x2F;code&gt;  and &lt;code&gt;&#x2F;proc&lt;&#x2F;code&gt; pseudo
filesystems on their userland, Abstract namespaced addresses would solve
the notion of having a shared filesystem between Android and Termux by
completely eliminating it on a deeper level.&lt;&#x2F;p&gt;
&lt;p&gt;We could just make an Abstract IPC socket with the same name on both
Termux and an Android app, and both would look for a file with the of
the socket under &lt;code&gt;&#x2F;proc&#x2F;net&#x2F;unix&lt;&#x2F;code&gt; .&lt;&#x2F;p&gt;
&lt;p&gt;Who needs block-based filesystems when the Kernel&#x27;s synthetic
filesystems are so versatile.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;zmq-and-abstract-sockets&quot;&gt;ZMQ and Abstract Sockets&lt;&#x2F;h3&gt;
&lt;p&gt;The only thing remaining was to confirm whether ZMQ supports abstract
sockets. And by perusing through the code-base several times earlier, I
remembered that it did indeed&lt;sup class=&quot;footnote-reference&quot;&gt;&lt;a href=&quot;#third&quot;&gt;3&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt; We just need to prefix our paths
with &lt;code&gt;@&lt;&#x2F;code&gt; and ZMQ would identify it as an Abstract namespace address.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;final-implementation&quot;&gt;Final Implementation&lt;&#x2F;h2&gt;
&lt;p&gt;Before implementing my hypothesis, I cross-checked Android docs if
somehow their security policies block this behavior and I found that
Android says that it blocks app-level access to
&lt;code&gt;&#x2F;proc&#x2F;net&#x2F;unix&lt;&#x2F;code&gt;&lt;sup class=&quot;footnote-reference&quot;&gt;&lt;a href=&quot;#fourth&quot;&gt;4&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;I quickly coded the Android app, and assigned new hosts with the
Abstract namespaces for the sockets to connect to.&lt;&#x2F;p&gt;
&lt;p&gt;It worked !&lt;&#x2F;p&gt;
&lt;div  class=videoClass &gt;
    &lt;figure  class=center &gt;
        &lt;video controls
            
             class=center &gt;
            &lt;source src=&quot;liverun.mp4&quot;&gt;
        &lt;&#x2F;video&gt;
        
            &lt;figcaption  class=center  
                &gt;
                Live Run
            &lt;&#x2F;figcaption&gt;
        
    &lt;&#x2F;figure&gt;
&lt;&#x2F;div&gt;

&lt;hr &#x2F;&gt;
&lt;div class=&quot;footnote-definition&quot; id=&quot;first&quot;&gt;&lt;sup class=&quot;footnote-definition-label&quot;&gt;1&lt;&#x2F;sup&gt;
&lt;p&gt;Termux normally symlinks the directories, It would be better to study how Android practices its security when symlinking &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;termux&#x2F;termux-app&#x2F;blob&#x2F;81dd11315765814cc6b270f1126bd1565fa94f44&#x2F;app&#x2F;src&#x2F;main&#x2F;java&#x2F;com&#x2F;termux&#x2F;app&#x2F;TermuxInstaller.java#L265&quot;&gt;source&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;div&gt;
&lt;div class=&quot;footnote-definition&quot; id=&quot;second&quot;&gt;&lt;sup class=&quot;footnote-definition-label&quot;&gt;2&lt;&#x2F;sup&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20200209211732&#x2F;http:&#x2F;&#x2F;web.eecs.umich.edu&#x2F;~yurushao&#x2F;pubs&#x2F;sinspector_ccs2016.pdf&quot;&gt;Wayback Machine&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;div&gt;
&lt;div class=&quot;footnote-definition&quot; id=&quot;third&quot;&gt;&lt;sup class=&quot;footnote-definition-label&quot;&gt;3&lt;&#x2F;sup&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;zeromq&#x2F;libzmq&#x2F;blob&#x2F;a01d259db372bff5e049aa966da4efce7259af67&#x2F;src&#x2F;ipc_address.cpp#L59&quot;&gt;Source&lt;&#x2F;a&gt;  &lt;a rel=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;api.zeromq.org&#x2F;4-1:zmq-ipc&quot;&gt;Man Page&lt;&#x2F;a&gt;, which I read after solving everything :(&lt;&#x2F;p&gt;
&lt;&#x2F;div&gt;
&lt;div class=&quot;footnote-definition&quot; id=&quot;fourth&quot;&gt;&lt;sup class=&quot;footnote-definition-label&quot;&gt;4&lt;&#x2F;sup&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;developer.android.com&#x2F;about&#x2F;versions&#x2F;10&#x2F;privacy&#x2F;changes#proc-net-filesystem&quot;&gt;Android docs&lt;&#x2F;a&gt; which are kind of misleading because I did not face any issues in setting my PoC up.&lt;&#x2F;p&gt;
&lt;&#x2F;div&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Final Report - GSoC 2020</title>
        <published>2020-08-26T00:00:00+00:00</published>
        <updated>2020-08-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Gunwant Jain
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://wantguns.dev/blog/final-report/"/>
        <id>https://wantguns.dev/blog/final-report/</id>
        
        <content type="html" xml:base="https://wantguns.dev/blog/final-report/">&lt;p&gt;Its almost 3 months since I have been officially working with the
SharkBait team at Gentoo. A lot of ground has been covered, a lot is
still left. In this blog, I will explain the scope of SharkBait right
now and how I plan its future.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;work-covered&quot;&gt;Work Covered&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;porting-sharkbaitos&quot;&gt;Porting SharkBaitOS&lt;&#x2F;h3&gt;
&lt;p&gt;When KireinaHoro started working on SharkBait, the latest Android
version of that time was 8 or Android Oreo. Sharkbait at that time,
supported all the Android devices because it targeted only a specific
boot order, which was common till Android 8.
Then came Android 9, with its System-As-Root configuration, which
rendered SharkBait&#x27;s original boot order non functional for all devices
shipping with Android 9. &lt;br &#x2F;&gt;
The first month of my work revolved around porting SharkBait to SAR
based devices. I succeeded in doing so, and wrote blogs about it:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;wantguns.dev&#x2F;blog&#x2F;android-boot-high-jinks&#x2F;&quot;&gt;&lt;strong&gt;Android Boot High Jinks&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt; &lt;br &#x2F;&gt;
In this blog we discuss the different approaches at booting
Android, Google has experimented with.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;wantguns.dev&#x2F;blog&#x2F;booting-gentoo-using-preinit&#x2F;&quot;&gt;&lt;strong&gt;Booting Gentoo from SAR-Preinit&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt; &lt;br &#x2F;&gt;
This blog showcases how I patched my phone&#x27;s kernel in order to
boot Gentoo on my phone.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;wantguns.dev&#x2F;blog&#x2F;starting-android-in-gentoo&#x2F;&quot;&gt;&lt;strong&gt;Starting System-as-Root Android in a LXC container&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt; &lt;br &#x2F;&gt;
This blog is the first class guide for launching SharkBait in
System-As-Root devices.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The projects made in efforts to port SharkBait for SAR were:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;WantGuns&#x2F;sar-preinit&quot;&gt;&lt;strong&gt;SAR-Preinit&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt; &lt;br &#x2F;&gt;
This repository acts as the setup which patches your custom kernel
and makes it boot a GNU&#x2F;Linux distro, instead of Android on your
phone.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;WantGuns&#x2F;bootstrap-init&quot;&gt;&lt;strong&gt;Bootstrap-init&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt; &lt;br &#x2F;&gt;
This repository hosts the source of the init binary executed inside
the LXC container which launches System-As-Root Android on top of
Gentoo.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;introducing-android-builds-on-aarch64-hosts&quot;&gt;Introducing Android builds on AArch64 Hosts&lt;&#x2F;h3&gt;
&lt;p&gt;As simple as it sounds, this part of my GSoC tenure turned out to be the
exact opposite. &lt;br &#x2F;&gt;
My first task was to provide a AArch64 native port of the LLVM toolchain
AOSP uses. I was stuck on compiling and testing my modified scripts till
the second month, when my mentor generously set up a beefy AArch64
server for me. I succeeded in delivering that toolchain. Related sources
are:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;wantguns.dev&#x2F;blog&#x2F;build-android&#x2F;&quot;&gt;&lt;strong&gt;Building Android: BTS&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt; &lt;br &#x2F;&gt;
In this blog, I look what events get triggered under the hood when
we build Android, as to seek insight on breaking down Android later.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;WantGuns&#x2F;toolchain_llvm_android&quot;&gt;&lt;strong&gt;Toolchain_LLVM_Android&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt; &lt;br &#x2F;&gt;
This repository hosts the build scripts and instructions on building
AOSP&#x27;s LLVM distribution on AArch64 Host, which targets AArch64 and
Arm platforms&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Once I dealt with the toolchains, I could focus on building Android.
Unfortunately this part is still unfinished due to the massive scale of
thought-process and work it requires. Still, I will report on whatever I
have been doing:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;WantGuns&#x2F;manifest&#x2F;&quot;&gt;&lt;strong&gt;Manifest&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt; &lt;br &#x2F;&gt;
This is the (yet-to-be) SharkBait Manifest. It houses the different
AOSP components SharkBait pulls in order to build Android. Some of
which I have been working on:
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;WantGuns&#x2F;android_build_soong&#x2F;commits?author=WantGuns&quot;&gt;android_build_blueprint&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;WantGuns&#x2F;android_build_soong&#x2F;commits?author=WantGuns&quot;&gt;android_build_soong&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;WantGuns&#x2F;android_build&#x2F;commits?author=WantGuns&quot;&gt;android_build&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;future-work&quot;&gt;Future Work&lt;&#x2F;h2&gt;
&lt;p&gt;There are many things to be concerned with such as the flow of project
development to follow, how exactly we should aim introducing
arm64 as an host. &lt;br &#x2F;&gt;
Plus the final goal of SharkBait is the ability to
upgrade its Android container with the use of Portage, thus providing
granular, GNU like updates to Android, quite possibly the first time
ever. Keeping all this in mind we needed a proper roadmap on how to
achieve this. My vision for it resembles somewhat like the following:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Build Android as an whole separate entity on AArch64.&lt;&#x2F;li&gt;
&lt;li&gt;Then compose a monolithic ebuild for the exact same thing.&lt;&#x2F;li&gt;
&lt;li&gt;Start breaking parts from Android:
&lt;ul&gt;
&lt;li&gt;Ship the toolchains used by AOSP separately using Portage and
possibly integrate it with crossdev.&lt;&#x2F;li&gt;
&lt;li&gt;Ship the necessary prebuilt &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;LineageOS&#x2F;android_prebuilts_build-tools&quot;&gt;build-tools&lt;&#x2F;a&gt; AOSP bundles as
packages with Portage on arm64.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Capitalizing on the fact that AOSP code is highly modular, separate
those modules into different packages under a common overlay.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;And since I consider myself apt in bringing this for SharkBait, I would
love to work on it even after GSoC finishes.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;acknowledgements&quot;&gt;Acknowledgements&lt;&#x2F;h2&gt;
&lt;p&gt;I immensely appreciate the patience of my mentor, Benda Xu. He has
always given me the helm when it comes to SharkBait, while still
actively monitoring my work and helping me out. Without his generous
efforts of providing me with an industry-standard arm64 server, I dont
think I could consider this GSoC a success.&lt;&#x2F;p&gt;
&lt;p&gt;My co-mentors - Pengcheng Xu, Lucas Ramage and Stephen Christie helped
me whenever I got stuck in my work. Pengcheng offered me assistance in
getting UART work for my Phone, Lucas actively kept a lookout on my work
and Stephen would offer me assistance in getting better hardware without
two thoughts.&lt;&#x2F;p&gt;
&lt;p&gt;All of them offered crucial personal help whenever I was stuck, be it my
work, understanding the project or even my proposal writing, something
which I can never overlook.&lt;&#x2F;p&gt;
&lt;p&gt;The least I can do to return their favours is to bring SharkBait to all
its glory, which I eagerly wait for.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Building Android: BTS</title>
        <published>2020-07-13T00:00:00+00:00</published>
        <updated>2020-07-13T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Gunwant Jain
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://wantguns.dev/blog/build-android/"/>
        <id>https://wantguns.dev/blog/build-android/</id>
        
        <content type="html" xml:base="https://wantguns.dev/blog/build-android/">&lt;p&gt;So you&#x27;ve successfully compiled AOSP. But you are still not entertained
and rather inquisitive about how things worked under the hood after you
hit &lt;code&gt;make bacon&lt;&#x2F;code&gt; or &lt;code&gt;brunch&lt;&#x2F;code&gt; on your Lineage tree.&lt;&#x2F;p&gt;
&lt;p&gt;I am too and so I decided to take a look under the myriad that AOSP is.
In this blog, I would share what I have learned so far, also being
relevent to my GSoC obligations and therefore prepping hand by hand for a native aarch64 build.&lt;&#x2F;p&gt;
&lt;p&gt;So just setup your build environment and follow along.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;toolchains&quot;&gt;Toolchains&lt;&#x2F;h2&gt;
&lt;p&gt;Android has decided to phase out of using a GCC toolchain to the
LLVM&#x2F;Clang based solution since Android 8.0. People usually see a
performance boost after the switch.&lt;&#x2F;p&gt;
&lt;p&gt;The actual Toolchain AOSP uses is already prebuilt and bundled with the
entire AOSP source. But since AOSP only supports a Linux&#x2F;Darwin x86 host
enviroment for building, we will have to build our own toolchain
supporting aarch64 hosts.&lt;&#x2F;p&gt;
&lt;p&gt;In order to do that we shall dive deep first and study &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;android.googlesource.com&#x2F;toolchain&#x2F;llvm_android&#x2F;&quot;&gt;llvm_android&lt;&#x2F;a&gt;,
the source of the prebuilt toolchain.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;llvm-android&quot;&gt;LLVM_android&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;em&gt;I should mention that we could have used vanilla LLVM, but Google pushes some &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;android.googlesource.com&#x2F;toolchain&#x2F;llvm_android&#x2F;+&#x2F;refs&#x2F;heads&#x2F;master&#x2F;patches&#x2F;&quot;&gt;patches&lt;&#x2F;a&gt; along with its LLVM fork which is required by AOSP. So it is better if we stick to the way Google handles it. These patches are applied to the toolchain in between its compilation.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;After setting that toolchain up and doing a build test on x86, we
realise that LLVM_android ships with prebuilt GCC and Clang toolchains.
It uses Clang as its compiler and GCC&#x27;s libs and binaries to build the
stage 1 of the LLVM_android compiler.&lt;&#x2F;p&gt;
&lt;p&gt;LLVM_android also ships with the Bionic (Android&#x27;s libc) sources. Though we notice while building the toolchain that only Bionic&#x27;s headers are copied to the building toolchain. Bionic is not compiled at this stage.&lt;&#x2F;p&gt;
&lt;p&gt;After building &lt;code&gt;swig&lt;&#x2F;code&gt; and &lt;code&gt;libedit&lt;&#x2F;code&gt; we finally reach the start of stage
2.
As expected the script now calls CMake again but with debug flags
referring to the newly built Clang&#x2F;++ and its libraries. It also calls
the prebuilt libraries like it did earlier.&lt;&#x2F;p&gt;
&lt;p&gt;Briefly put these are all the building parts, in order:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;For Linux:
&lt;ul&gt;
&lt;li&gt;Stage 1:  builds the crude Clang&lt;&#x2F;li&gt;
&lt;li&gt;swig:     required for Stage 2&lt;&#x2F;li&gt;
&lt;li&gt;libedit:  required for Stage 2&lt;&#x2F;li&gt;
&lt;li&gt;Stage 2:  builds the final Clang&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;For Android { arm, aarch64, x86, i386 }:
&lt;ul&gt;
&lt;li&gt;sysroots&lt;&#x2F;li&gt;
&lt;li&gt;compiler-rt&lt;&#x2F;li&gt;
&lt;li&gt;compiler-rt-i386-host (only for linux)&lt;&#x2F;li&gt;
&lt;li&gt;libomp&lt;&#x2F;li&gt;
&lt;li&gt;lldb-server&lt;&#x2F;li&gt;
&lt;li&gt;asan-mapfile&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;We will have to patch &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;android.googlesource.com&#x2F;toolchain&#x2F;llvm_android&#x2F;+&#x2F;refs&#x2F;heads&#x2F;master&#x2F;paths.py&quot;&gt;paths.py&lt;&#x2F;a&gt; and replace the paths where the script calls its tools with the host&#x27;s to compensate for the aarch64 host.
Additionally, we should only &lt;code&gt;sync&lt;&#x2F;code&gt; the repositories which are necessary by editing the &lt;code&gt;.repo&#x2F;manifest.xml&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;But enough of that, let&#x27;s move on to building Android now.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;building-android-using-the-toolchain-we-just-made&quot;&gt;Building Android using the toolchain we just made&lt;&#x2F;h2&gt;
&lt;p&gt;If not done already, sync Lineage&#x27;s Android Manifest.
Put the newly made toolchain at &lt;code&gt;prebuilts&#x2F;clang&#x2F;host&#x2F;linux-x86&#x2F;&lt;&#x2F;code&gt;
and change the Clang version to that of the one we just built at
&lt;code&gt;build&#x2F;soong&#x2F;cmd&#x2F;cc&#x2F;config&#x2F;global.go&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Now setup the environment and brunch your device.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;source&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; build&#x2F;envsetup.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;brunch&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; _TARGET_NAME_&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You&#x27;ll notice that Building would give errors due to warnings.
We come to yet another realisation that AOSP uses an older version of Clang (9.0.3 currently).
The toolchain we just built is at bleeding edge, and is throwing errors at the old code as it
finds vulnerabilities in it.
We should recall that the lineage tree we synced is stable and so all
the warnings generated by the newer compiler can actually be avoided. We
could approach this in two ways:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Disable certain flags which throws those errors.&lt;&#x2F;li&gt;
&lt;li&gt;compile the current supported version of clang and use it instead.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Approach 1 would be time intensive and not scalable in any way, since we
don&#x27;t control the main tree and upstream could make our forks fatal.
So we should follow the second approach.&lt;&#x2F;p&gt;
&lt;p&gt;And so once we get a hold of the correct toolchain version, the builds
should not be throwing errors.&lt;&#x2F;p&gt;
&lt;p&gt;Let me explain the build process now. Once you &lt;code&gt;make bacon&lt;&#x2F;code&gt; or &lt;code&gt;brunch&lt;&#x2F;code&gt;,
the soong build system is called and is compiled.
The very first program built is &lt;code&gt;soong_ui&lt;&#x2F;code&gt; which is the build
system used to iniate the build process. The target you lunch will be
passed to the newly built &lt;code&gt;soong_ui&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Go is used to build all of &lt;code&gt;soong&lt;&#x2F;code&gt;, and AOSP ships its prebuilt version of Go.
We will have to change the location of GOROOT to use host&#x27;s tools.
GOROOT is called at &lt;code&gt;build&#x2F;blueprint&#x2F;microfactory&#x2F;microfactory.bash&lt;&#x2F;code&gt;
so we will edit it there.&lt;&#x2F;p&gt;
&lt;p&gt;Eventually it parses all the blueprint files (.bp extensions), and kati parses all
the makefiles. Once the &lt;code&gt;build.ninja&lt;&#x2F;code&gt; file is created, the Android build
is ready to start.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;build.ninja&lt;&#x2F;code&gt; is called and it starts building certain intermediates
first which would be used later in assistance to build Android. One of
these intermediates which is of concern to us is &lt;strong&gt;&lt;code&gt;Bionic&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;compiling-bionic&quot;&gt;Compiling Bionic&lt;&#x2F;h3&gt;
&lt;p&gt;Like we discussed earlier, Bionic&#x27;s header files are already included in
the llvm_android toolchain. But the &lt;code&gt;libc&lt;&#x2F;code&gt; sources are not compiled then.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;libc&lt;&#x2F;code&gt; and friends are actually compiled within the build as
intermediates and then copied to some different folder under &lt;code&gt;&#x2F;out&lt;&#x2F;code&gt;, from where it
gets called later in the build process.&lt;&#x2F;p&gt;
&lt;p&gt;So, as I believe, once we have the toolchain ready, we should be good to
go for building Android using aarch64 host. I will be setting up an
ARM based VPS for the same, since I only have 32 gig of storage on my
phone.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;&#x2F;h2&gt;
&lt;p&gt;We need to build llvm_android on aarch64 host, by patching the build scripts provided by Google.
Also we need to build the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;android.googlesource.com&#x2F;platform&#x2F;prebuilts&#x2F;clang&#x2F;host&#x2F;linux-x86&#x2F;+&#x2F;master&#x2F;README.md#llvm-users&quot;&gt;latest supported version&lt;&#x2F;a&gt; of Clang&#x2F;LLVM.
Once that is done, we will have to edit the paths of various tools called in the AOSP tree with our host&#x27;s. And then finally, test a build.&lt;&#x2F;p&gt;
&lt;p&gt;Achieving this should mark my task of building Android on aarch64 Host,
which is incomplete in the sense that I don&#x27;t have a separatable
toolchain. But once we are through with this process, Separating Bionic
and implementing crossdev for the toolchain would be easier.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Starting System-as-Root Android in a LXC container</title>
        <published>2020-06-23T00:00:00+00:00</published>
        <updated>2020-06-23T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Gunwant Jain
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://wantguns.dev/blog/starting-android-in-gentoo/"/>
        <id>https://wantguns.dev/blog/starting-android-in-gentoo/</id>
        
        <content type="html" xml:base="https://wantguns.dev/blog/starting-android-in-gentoo/">&lt;p&gt;As I progress in my GSoC journey, my next task is to boot System-As-Root based Android in an LXC container inside Gentoo. As the name suggests, SAR devices use &#x2F;system as their rootdir instead of &#x2F;boot. SharkBait was based on the older booting mechanism.
If you would want to know more about Android&#x27;s Booting mechanism, I would recommend to have a look at this &lt;a href=&quot;https:&#x2F;&#x2F;wantguns.dev&#x2F;blog&#x2F;android-boot-high-jinks&#x2F;&quot;&gt;blog&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Basically if you own a device that &lt;strong&gt;&lt;em&gt;shipped&lt;&#x2F;em&gt;&lt;&#x2F;strong&gt; with Android 9 (even the ones which are updated to Android 10) you would want to follow this guide.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;&#x2F;h2&gt;
&lt;p&gt;This setup expects some prerequisites which are as follows:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Have Gentoo installed as a chroot in your Android device. &lt;a href=&quot;https:&#x2F;&#x2F;wantguns.dev&#x2F;blog&#x2F;install-gentoo&#x2F;&quot;&gt;guide&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;You should have a LXC enabled Kernel. &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;wiki.gentoo.org&#x2F;wiki&#x2F;LXC#Kernel_with_the_appropriate_LXC_options_enabled&quot;&gt;guide&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;You should have encryption disabled on your phone. &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;Zackptg5&#x2F;Disable_Dm-Verity_ForceEncrypt&quot;&gt;guide&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;You should have SELinux disabled.&lt;&#x2F;li&gt;
&lt;li&gt;You should have the &lt;strong&gt;schedtune&lt;&#x2F;strong&gt; cgroup disabled.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;The 4th and 5th prerequisites are addressed in the next section.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;preparing-the-boot-image&quot;&gt;Preparing the boot image&lt;&#x2F;h2&gt;
&lt;p&gt;Clone the SAR-Preinit repository&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; clone&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; https:&#x2F;&#x2F;gitlab.com&#x2F;WantGuns&#x2F;sar-preinit.git&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-depth&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Pull out your device&#x27;s &lt;code&gt;boot.img&lt;&#x2F;code&gt; in the artifacts directory.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;cd&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; sar-preinit&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;adb&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; root&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;adb&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; shell&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; dd&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; if=&#x2F;dev&#x2F;block&#x2F;bootdevice&#x2F;by-name&#x2F;boot&lt;&#x2F;span&gt;&lt;span&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt; dd&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; of=artifacts&#x2F;boot.img&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now unpack the boot.img using the Makefile provided and edit the &lt;strong&gt;bootimg.cfg&lt;&#x2F;strong&gt; file produced in &lt;code&gt;out&#x2F;unpack&lt;&#x2F;code&gt; directory.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;make&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; unpack&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;nvim&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; out&#x2F;unpack&#x2F;bootimg.cfg&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add this string to the &lt;code&gt;cmdline&lt;&#x2F;code&gt; key, if not already present.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;androidboot.selinux=permissive cgroup_disable=schedtune&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This addresses the 4th and 5th prerequisites. If the kernel you are currently using is not LXC-enabled, you could swap the &lt;strong&gt;zImage&lt;&#x2F;strong&gt; inside the unpack directory with the LXC-enabled kernel image.&lt;&#x2F;p&gt;
&lt;p&gt;Now we can finally repack and patch the boot image for the use of SharkBait.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;make&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; repack&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The &lt;code&gt;boot-mod.img&lt;&#x2F;code&gt; under the out directory is the patched boot which we need. Just don&#x27;t flash it yet.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;preparing-the-bootstrap-init&quot;&gt;Preparing the bootstrap-init&lt;&#x2F;h2&gt;
&lt;p&gt;Since System-As-Root requires a special environment unlike Android&#x27;s older iterations, we need a &lt;strong&gt;init&lt;&#x2F;strong&gt; to bootstrap Android in the container.
Currently the &lt;strong&gt;bootstrap-init&lt;&#x2F;strong&gt; requires NDK for building, this is subject to change for native compilation later.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;People who are in a hurry could checkout the pre-built binaries provided &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;WantGuns&#x2F;bootstrap-init&#x2F;-&#x2F;jobs&#x2F;608731821&#x2F;artifacts&#x2F;browse&#x2F;libs&#x2F;&quot;&gt;here&lt;&#x2F;a&gt; and skip the hassle of manually setting up their environment and compiling it.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;If you&#x27;re not one of them, continue following.
Clone the repository and edit the Makefile&#x27;s provided NDK path with your own NDK path.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; clone&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; https:&#x2F;&#x2F;gitlab.com&#x2F;WantGuns&#x2F;bootstrap-init.git&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-depth&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;cd&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; bootstrap-init&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;nvim&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; Makefile&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Then call &lt;code&gt;make&lt;&#x2F;code&gt; in the bootstrap-init folder. This will build the required binary for different architechtures, we should focus on arm64-v8a inside the libs folder.&lt;&#x2F;p&gt;
&lt;p&gt;Copy the downloaded&#x2F;compiled &lt;strong&gt;bootstrap-init&lt;&#x2F;strong&gt; to Gentoo&#x27;s home, we will need it later.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;adb&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; push&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; libs&#x2F;arm64-v8a&#x2F;bootstrap-init&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;data&#x2F;gnu&#x2F;home&#x2F;init&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;preparing-gentoo-for-android&quot;&gt;Preparing Gentoo for Android&lt;&#x2F;h2&gt;
&lt;p&gt;Chroot into Gentoo and start setting it up.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;adb&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; root&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;adb&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; shell&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;# Now switched to Android&amp;#39;s shell&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Generate SSH key pairs, (will come in use later)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;ssh-keygen&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;t&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; ed25519&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;C&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; android&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;f&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;data&#x2F;ssh&#x2F;id_ed25519&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;mount&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;t&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; proc&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;proc&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;data&#x2F;gnu&#x2F;proc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;mount&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-rbind&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;dev&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;data&#x2F;gnu&#x2F;dev&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;mount&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-rbind&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;sys&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;data&#x2F;gnu&#x2F;sys&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;chroot&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;data&#x2F;gnu&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;bin&#x2F;bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;# Now switched to Gentoo&amp;#39;s root&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;source&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;etc&#x2F;profile&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;p&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;var&#x2F;lib&#x2F;android&#x2F;{system,vendor,data,system,cache}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;p&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;var&#x2F;lib&#x2F;lxc&#x2F;android&#x2F;{rootfs,run,artifacts}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;All the commands henceforth are executed in the Gentoo chroot unless specified otherwise.&lt;&#x2F;em&gt;&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;fstab&quot;&gt;Fstab&lt;&#x2F;h3&gt;
&lt;p&gt;Edit Gentoo&#x27;s fstab with mount entries for Android&#x27;s partitions.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;###&#x2F;etc&#x2F;fstab#####&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Android mounts&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;&#x2F;dev&#x2F;mmcblk0p63&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;var&#x2F;lib&#x2F;android&#x2F;system&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; ext4&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; ro,barrier=1,inode_readahead_blks=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;8&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;&#x2F;dev&#x2F;mmcblk0p55&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;var&#x2F;lib&#x2F;android&#x2F;persist&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; ext4&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;&#x2F;dev&#x2F;mmcblk0p64&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;var&#x2F;lib&#x2F;android&#x2F;vendor&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; ext4&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; ro,barrier=1,inode_readahead_blks=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;8&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;&#x2F;dev&#x2F;mmcblk0p62&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;var&#x2F;lib&#x2F;android&#x2F;cache&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; ext4&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;&#x2F;dev&#x2F;mmcblk0p66&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;var&#x2F;lib&#x2F;android&#x2F;data&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; ext4&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,inode_readahead_blks=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;8&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; Bind into container&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;&#x2F;run&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;var&#x2F;lib&#x2F;lxc&#x2F;android&#x2F;rootfs&#x2F;run&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; none&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; bind&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;install-lxc&quot;&gt;Install LXC&lt;&#x2F;h3&gt;
&lt;p&gt;At the time of writing this blog, LXC&#x27;s version 4 does not work for the setup. I would recommend to install the version 3.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;emerge&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;av&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-autounmask=y&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; =app-emulation&#x2F;lxc-3.0.3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;After this is done, setup the helper scripts for the container.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;cd&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;var&#x2F;lib&#x2F;lxc&#x2F;android&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;# lxc&amp;#39;s config&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;cat&lt;&#x2F;span&gt;&lt;span&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; config&lt;&#x2F;span&gt;&lt;span&gt; &amp;lt;&amp;lt;&lt;&#x2F;span&gt;&lt;span&gt;EOF&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;lxc.uts.name = android&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;lxc.rootfs.path = &#x2F;var&#x2F;lib&#x2F;lxc&#x2F;android&#x2F;rootfs&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;lxc.init.cmd = &#x2F;init&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;lxc.net.0.type = none&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;lxc.autodev = 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;lxc.log.level = 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;lxc.log.file = &#x2F;var&#x2F;log&#x2F;lxc&#x2F;hellalxc.log&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;lxc.hook.pre-start = &#x2F;var&#x2F;lib&#x2F;lxc&#x2F;android&#x2F;pre-start.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;lxc.hook.post-stop = &#x2F;var&#x2F;lib&#x2F;lxc&#x2F;android&#x2F;post-stop.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;lxc.cgroup.cpu.rt_runtime_us = 950000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;lxc.console.path = none&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;EOF&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;# pre-start.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;cat&lt;&#x2F;span&gt;&lt;span&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; pre-start.sh&lt;&#x2F;span&gt;&lt;span&gt; &amp;lt;&amp;lt;&lt;&#x2F;span&gt;&lt;span&gt;EOF&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;#!&#x2F;bin&#x2F;sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;cp &#x2F;var&#x2F;lib&#x2F;lxc&#x2F;android&#x2F;artifacts&#x2F;init &#x2F;var&#x2F;lib&#x2F;lxc&#x2F;android&#x2F;rootfs&#x2F;init&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;mkdir -p &#x2F;var&#x2F;lib&#x2F;lxc&#x2F;android&#x2F;rootfs&#x2F;dev&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;mkdir -p &#x2F;run&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;if [ -f &#x2F;run&#x2F;.android-shutdown ]; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;        # we&amp;#39;re shutting down; don&amp;#39;t respawn&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;        echo &amp;quot;Shutting down, won&amp;#39;t restart.&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;        exit 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;# handle cgroup&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;mkdir &#x2F;sys&#x2F;fs&#x2F;cgroup&#x2F;cpu&#x2F;lxc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;echo 950000 &amp;gt; &#x2F;sys&#x2F;fs&#x2F;cgroup&#x2F;cpu&#x2F;lxc&#x2F;cpu.rt_runtime_us&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;EOF&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;# post-stop.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;cat&lt;&#x2F;span&gt;&lt;span&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; post-stop.sh&lt;&#x2F;span&gt;&lt;span&gt; &amp;lt;&amp;lt;&lt;&#x2F;span&gt;&lt;span&gt;EOF&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;#!&#x2F;bin&#x2F;bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;# do not reboot &#x2F; restart when debugging&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;if [ -f &#x2F;run&#x2F;.android-debug ]; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;        echo &amp;quot;Debug mode, won&amp;#39;t power off.&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;        exit 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;# clean rootfs for SAR-enabled devices.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;rm -rf &#x2F;var&#x2F;lib&#x2F;lxc&#x2F;android&#x2F;rootfs&#x2F;*&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;# leave mark to prevent container restart&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;touch &#x2F;run&#x2F;.android-shutdown&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;if [ -f &#x2F;run&#x2F;.android-reboot ]; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;        echo &amp;quot;Rebooting...&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;        reboot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;        echo &amp;quot;Powering off...&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;        poweroff&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;EOF&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Copy the &lt;strong&gt;bootstrap-init&lt;&#x2F;strong&gt; binary to the &lt;strong&gt;artifacts&lt;&#x2F;strong&gt; folder.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;cp&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;home&#x2F;init&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;var&#x2F;lib&#x2F;lxc&#x2F;android&#x2F;artifacts&#x2F;init&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If it helps, this is the &lt;code&gt;&#x2F;var&#x2F;lib&#x2F;lxc&#x2F;android&lt;&#x2F;code&gt; tree :&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;localhost&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;var&#x2F;lib&#x2F;lxc&#x2F;android&lt;&#x2F;span&gt;&lt;span&gt; $&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; tree&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;├──&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; artifacts&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;│  &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; └──&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; init&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;├──&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; config&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;├──&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; post-stop.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;├──&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; pre-start.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;├──&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; rootfs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;└──&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; run&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Check if the container is getting detected by Android using &lt;code&gt;lxc-info android&lt;&#x2F;code&gt;. If it is getting detected, we should be ready to go.&lt;&#x2F;p&gt;
&lt;p&gt;Finally, setup the &lt;strong&gt;lxc.android&lt;&#x2F;strong&gt; service so that the container auto-starts on boot.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;cd&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;etc&#x2F;init.d&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;ln&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;s&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; lxc&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; lxc.android&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;rc-update&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; add&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; lxc.android&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; boot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;As a bonus, we can also setup SSH for accessing Gentoo when Android boots. The &lt;strong&gt;dialhome&lt;&#x2F;strong&gt; script mentioned below can be found &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;sharkbaitOS&#x2F;bootstrap&#x2F;setup&#x2F;-&#x2F;blob&#x2F;master&#x2F;scripts&#x2F;dialhome&quot;&gt;here&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;umask&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 077&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;p&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; ~&#x2F;.ssh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;mount&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;dev&#x2F;block&#x2F;by-name&#x2F;userdata&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;var&#x2F;lib&#x2F;android&#x2F;data&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;cat&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;var&#x2F;lib&#x2F;android&#x2F;data&#x2F;ssh&#x2F;id_ed25519.pub&lt;&#x2F;span&gt;&lt;span&gt; &amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; ~&#x2F;.ssh&#x2F;authorized_keys&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;cp&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; dialhome&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;var&#x2F;lib&#x2F;android&#x2F;data&#x2F;ssh&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;chmod&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; u+x&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;var&#x2F;lib&#x2F;android&#x2F;data&#x2F;ssh&#x2F;dialhome&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;chown&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; 2000:2000&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;var&#x2F;lib&#x2F;android&#x2F;data&#x2F;ssh&#x2F;dialhome&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;umount&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;var&#x2F;lib&#x2F;android&#x2F;data&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;rc-update&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; add&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; sshd&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; default&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;We are done with Gentoo now, exit it and unmount its pseudofs&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;exit&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;# Now back in Android&amp;#39;s Shell&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;umount&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;f&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;data&#x2F;gnu&#x2F;proc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;umount&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;l&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;data&#x2F;gnu&#x2F;sys&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;umount&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;l&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;data&#x2F;gnu&#x2F;dev&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;final-steps&quot;&gt;Final Steps&lt;&#x2F;h2&gt;
&lt;p&gt;We are almost done now.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Reboot to your Recovery and flash the &lt;code&gt;boot-mod.img&lt;&#x2F;code&gt; to the &lt;code&gt;boot&lt;&#x2F;code&gt; partition.
Fastboot users could also flash it via&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;fastboot&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; flash&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; boot&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; boot-mod.img&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol&gt;
&lt;li&gt;While you&#x27;re in the Recovery mode, fire up adb again and patch the &lt;code&gt;init.rc&lt;&#x2F;code&gt; present in &lt;code&gt;&#x2F;system&lt;&#x2F;code&gt; according to the patch &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;sharkbaitOS&#x2F;bootstrap&#x2F;setup&#x2F;-&#x2F;blob&#x2F;master&#x2F;devices&#x2F;angler&#x2F;patches&#x2F;init.rc.patch&quot;&gt;here&lt;&#x2F;a&gt;. Keep in mind that we &lt;strong&gt;&lt;em&gt;do not&lt;&#x2F;em&gt;&lt;&#x2F;strong&gt; need to patch Android&#x27;s &lt;code&gt;fstab&lt;&#x2F;code&gt; if you&#x27;re following this setup.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;And then finally cross your fingers and reboot. If Android boots, congrats, you just joined the SharkBait party. But it gets even better.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;final-thoughts-and-scopes-of-improvement&quot;&gt;Final Thoughts and Scopes of Improvement&lt;&#x2F;h2&gt;
&lt;p&gt;If Android does not boot, check the logs at &lt;code&gt;&#x2F;data&#x2F;gnu&#x2F;var&#x2F;logs&lt;&#x2F;code&gt;. Check &lt;code&gt;dmesg&lt;&#x2F;code&gt; for kernel logs, &lt;code&gt;rc.log&lt;&#x2F;code&gt;, &lt;code&gt;messages&lt;&#x2F;code&gt; for Gentoo&#x27;s logs, &lt;code&gt;lxc&#x2F;hellalxc.log&lt;&#x2F;code&gt; and &lt;code&gt;lxc&#x2F;android.log&lt;&#x2F;code&gt; for LXC logs.&lt;&#x2F;p&gt;
&lt;p&gt;Currently SharkBait is at a very young stage. Encryption and SELinux are not supported right now. But this is subject to change once SharkBait matures.&lt;&#x2F;p&gt;
&lt;p&gt;Also if this entire process seems a bit lengthy, I should inform that when the &lt;strong&gt;bootstrap-init&lt;&#x2F;strong&gt; and &lt;strong&gt;sar-preinit&lt;&#x2F;strong&gt; merges into the official SharkBait workflow, this install will take significantly lower efforts and would be a breeze to the porters as well as the users of SharkBait.&lt;&#x2F;p&gt;
&lt;p&gt;Lastly I should give credits to the official &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;wiki.gentoo.org&#x2F;wiki&#x2F;Android&#x2F;SharkBait&#x2F;Starting_Android_in_LXC&quot;&gt;guide&lt;&#x2F;a&gt; on which this install guide is based on. Please have a look at it as well as my other blogs to understand how this works under-the-hood.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;div  class=imageClass &gt;
    &lt;figure  class=center &gt;
        &lt;img src=&quot;neofetch.jpg&quot; alt=&quot;neofetch&quot;  
            
             class=center  &#x2F;&gt;
        
            &lt;figcaption  class=center  
                &gt;
                Obligatory Neofetch
            &lt;&#x2F;figcaption&gt;
        
    &lt;&#x2F;figure&gt;
&lt;&#x2F;div&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Booting Gentoo from SAR-Preinit; or Debugging the init, the Hard Way</title>
        <published>2020-06-06T00:00:00+00:00</published>
        <updated>2020-06-06T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Gunwant Jain
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://wantguns.dev/blog/booting-gentoo-using-preinit/"/>
        <id>https://wantguns.dev/blog/booting-gentoo-using-preinit/</id>
        
        <content type="html" xml:base="https://wantguns.dev/blog/booting-gentoo-using-preinit/">&lt;p&gt;As you would know from my previous &lt;a href=&quot;https:&#x2F;&#x2F;wantguns.dev&#x2F;blog&#x2F;uart-on-lavender&#x2F;&quot;&gt;blog&lt;&#x2F;a&gt;, I couldn&#x27;t make the UART work for my phone. Since without a serial console, the boot-up process is no less than a black-box, I decided to use some hacky debugs for finding out what went wrong with the original &lt;code&gt;preinit&lt;&#x2F;code&gt;. If you&#x27;re not in for the process of going through it and just want to cut to the chase, jump onto this &lt;a href=&quot;https:&#x2F;&#x2F;wantguns.dev&#x2F;blog&#x2F;booting-gentoo-using-preinit&#x2F;#final-comments-and-what-to-follow-next&quot;&gt;section&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;circumventing-system-as-root&quot;&gt;Circumventing System-As-Root&lt;&#x2F;h2&gt;
&lt;p&gt;So, flashing a &lt;code&gt;preinit&lt;&#x2F;code&gt; failed for me. Again this was because of the changes in the boot-process of newer Android devices. If you have no clue about this, I would recommend reading this &lt;a href=&quot;https:&#x2F;&#x2F;wantguns.dev&#x2F;blog&#x2F;android-boot-high-jinks&#x2F;&quot;&gt;blog&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;What we needed to change was the behaviour of our kernel to take the &lt;code&gt;ramdisk&lt;&#x2F;code&gt; provided to it in the &lt;code&gt;boot.img&lt;&#x2F;code&gt; as its &lt;code&gt;rootfs&lt;&#x2F;code&gt;. @topjohnwu suggested in his &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;forum.xda-developers.com&#x2F;apps&#x2F;magisk&#x2F;pixel-2-pixel-2-xl-support-t3697427&#x2F;post74361728#post74361728&quot;&gt;infamous xda comment&lt;&#x2F;a&gt; that it could be achieved by substituting the &lt;code&gt;skip_ramdisk&lt;&#x2F;code&gt; string with any other. I tried doing this but it make the device boot straight up to Lineage (which we do not want).&lt;&#x2F;p&gt;
&lt;p&gt;Then I looked into what goes on under-the-hood when Magisk is flashed. It seems that Magisk hexpatches the kernel with some specfic strings which ultimately leads the kernel to take the ramdisk inside &lt;code&gt;boot.img&lt;&#x2F;code&gt; as its &lt;code&gt;rootfs&lt;&#x2F;code&gt;.
I double checked by cpio&#x27;ing the &lt;code&gt;magiskinit64&lt;&#x2F;code&gt; binary into an &lt;code&gt;ramdisk.cpio&lt;&#x2F;code&gt; incpio and then patching the kernel image using &lt;code&gt;magiskboot&lt;&#x2F;code&gt;, in a similar fashion to that of Magisk. Then packed the stuff into a &lt;code&gt;boot.img&lt;&#x2F;code&gt; (ofc including a bootimg.cfg).&lt;&#x2F;p&gt;
&lt;p&gt;Now remember, since we have patched the kernel, the kernel would take the &lt;code&gt;magiskinit64&lt;&#x2F;code&gt; as its init and exec it. Then &lt;code&gt;magiskinit64&lt;&#x2F;code&gt; would ultimately mount &lt;code&gt;&#x2F;system&lt;&#x2F;code&gt; as root and exec the &lt;code&gt;&#x2F;system&#x2F;bin&#x2F;init&lt;&#x2F;code&gt; thus entering the Android land.&lt;&#x2F;p&gt;
&lt;p&gt;And so we did. Lineage booted up. To cross-check, I also tried to boot using a boot.img without &lt;code&gt;magiskinit64&lt;&#x2F;code&gt; as its init. It did not reach the Android land.&lt;&#x2F;p&gt;
&lt;p&gt;And so I adopted this approach for circumventing SAR. But using &lt;code&gt;preinit&lt;&#x2F;code&gt; as the init inside &lt;code&gt;boot.img&lt;&#x2F;code&gt; still did not boot Gentoo up. So we come to the debugging phase.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-debugging-phase-skippable&quot;&gt;The Debugging Phase (skippable)&lt;&#x2F;h2&gt;
&lt;p&gt;The lack of a serial console, made me come up with some ugly debugs. First I tried to access the &lt;code&gt;last_kmsg&lt;&#x2F;code&gt; and &lt;code&gt;console-ramoops-0&lt;&#x2F;code&gt; for getting the kernel logs from the previous reboot. But I didn&#x27;t get any. I double checked my kernel defconfig whether I had the correct options enabled and yes they were.&lt;&#x2F;p&gt;
&lt;p&gt;At this point, I wan&#x27;t even unhappy. Time for a new debug method. What occured to me next was that we could &lt;code&gt;sleep&lt;&#x2F;code&gt; the init script between certain steps and time the process of my phone bootlooping. For a reference value, I recorded the time it took my phone to boot-loop without any &lt;code&gt;sleep&lt;&#x2F;code&gt;. I prepared myself for a night of constant phone reboots. The table below describes the entire process until finally booting Gentoo with insightful comments at the end.&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: center&quot;&gt;Attempt&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Time (in sec)&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Remarks&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Commit&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;1&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;10&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;reference&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;WantGuns&#x2F;sar-preinit&#x2F;-&#x2F;commit&#x2F;2037d2b9523f9c954b18d6efe85c803cac432563&quot;&gt;link&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;2&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;20&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;test &lt;code&gt;sleep&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;WantGuns&#x2F;sar-preinit&#x2F;-&#x2F;commit&#x2F;195c4d40a30bd412c8574d670432098ed1fd4ed9&quot;&gt;link&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;3&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;30&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;failed to mount at &lt;code&gt;&#x2F;userdata&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;WantGuns&#x2F;sar-preinit&#x2F;-&#x2F;commit&#x2F;15c1f7ae1c60983141f5f96e82d47c924e075d53&quot;&gt;link&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;4&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;41&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;kernel panics&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;WantGuns&#x2F;sar-preinit&#x2F;-&#x2F;commit&#x2F;b373d65a132363d58d608d354e82f1469cc3d289&quot;&gt;link&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;5&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;41&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;abandoning this approach&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;WantGuns&#x2F;sar-preinit&#x2F;-&#x2F;commit&#x2F;a5b6ac35c2822fb516bc471f4387a784308f94d3&quot;&gt;link&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;6&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;21&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;couldn&#x27;t mount &lt;code&gt;&#x2F;dev&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;WantGuns&#x2F;sar-preinit&#x2F;-&#x2F;commit&#x2F;3db8942d0c31cc3b3184962a4eea403cc6e49bc5&quot;&gt;link&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;7&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;35&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;&lt;code&gt;&#x2F;dev&lt;&#x2F;code&gt; is mounted&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;WantGuns&#x2F;sar-preinit&#x2F;-&#x2F;commit&#x2F;4af274df4fcda6ad05c63e6d8caca3cd3c422b47&quot;&gt;link&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;8&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;60+&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;Gentoo boots&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;WantGuns&#x2F;sar-preinit&#x2F;-&#x2F;commit&#x2F;f786531094daf77b7a0877177f9888d5d9e9b750&quot;&gt;link&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;At this point, I found out that the kernel could mount the userdata partition. I also realised that I was not getting last_ksmg because the kernel was not panicking and instead just &lt;code&gt;exit&lt;&#x2F;code&gt;ing. So I tried to get the &lt;code&gt;last_kmsg&lt;&#x2F;code&gt; next.&lt;&#x2F;li&gt;
&lt;li&gt;I tried to forcefully panic the kernel. And got the &lt;code&gt;last_kmsg&lt;&#x2F;code&gt; and &lt;code&gt;console-ramoops-0&lt;&#x2F;code&gt; in the next boot. But they didnt have the parts where kernel logged the Preinit messages. So I thought that giving them a higher priority would make them get picked by the &lt;code&gt;last_kmsg&lt;&#x2F;code&gt; and it didn&#x27;t help either.&lt;&#x2F;li&gt;
&lt;li&gt;Finally I abandoned this approach.&lt;&#x2F;li&gt;
&lt;li&gt;Then I looked into mounting the pseudo-filesystems. I realised that the kernel could not mount &#x2F;dev.&lt;&#x2F;li&gt;
&lt;li&gt;I realised that using &lt;code&gt;tmpfs&lt;&#x2F;code&gt; instead of &lt;code&gt;devtmpfs&lt;&#x2F;code&gt; mounts the &lt;code&gt;&#x2F;userdata&lt;&#x2F;code&gt;. What I did not know at that time that my kernel did not have the options for &lt;code&gt;devtmpfs&lt;&#x2F;code&gt; enabled in its &lt;code&gt;defconfig&lt;&#x2F;code&gt;, this all could be avoided.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;&#x2F;dev&lt;&#x2F;code&gt; mounts now, but we have to populate it as well.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;I did not have just 8 attempts, the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;WantGuns&#x2F;sar-preinit&#x2F;-&#x2F;commits&#x2F;timer&quot;&gt;commit history&lt;&#x2F;a&gt; would show that I forgot that my kernel was SELinux Enforcing, I had to change that among many other things. Robert Landley&#x27;s &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;landley.net&#x2F;writing&#x2F;&quot;&gt;blogs&lt;&#x2F;a&gt; on initramfs helped me get to know the very basics of an initramfs.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;final-comments-and-what-to-follow-next&quot;&gt;Final comments and What to follow next&lt;&#x2F;h2&gt;
&lt;p&gt;My &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;WantGuns&#x2F;sar-preinit&quot;&gt;sar-preinit&lt;&#x2F;a&gt; repository holds the current workflow of getting a SAR-enabled device boot Gentoo in the Android based device. The Makefile is pretty self-explanatory but still, if you want to follow the process:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Install Gentoo in you phone following this &lt;a href=&quot;https:&#x2F;&#x2F;wantguns.dev&#x2F;blog&#x2F;install-gentoo&#x2F;&quot;&gt;blog&lt;&#x2F;a&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Extract the &lt;code&gt;boot.img&lt;&#x2F;code&gt; from you Android phone. At the time of writing this blog, we dont have changing &lt;code&gt;selinux&lt;&#x2F;code&gt; modes automated. Please make sure that you do that first by adding &lt;code&gt;androidboot.selinux=permissive&lt;&#x2F;code&gt; string at the end of the kernel commandline in &lt;code&gt;bootimg.cfg&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Rename &lt;code&gt;boot.img&lt;&#x2F;code&gt; to &lt;code&gt;ogboot.img&lt;&#x2F;code&gt; and place it inside the artifacts folder.&lt;&#x2F;li&gt;
&lt;li&gt;Fire up a terminal and run&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;make&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; bootimg_chute&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol start=&quot;5&quot;&gt;
&lt;li&gt;Flash the &lt;code&gt;boot_mod.img&lt;&#x2F;code&gt; created inside the &lt;code&gt;out&lt;&#x2F;code&gt; directory on your phone, preferably using &lt;code&gt;fastboot boot&lt;&#x2F;code&gt;, if you&#x27;re not that confident. &lt;code&gt;fastboot boot&lt;&#x2F;code&gt; somehow doesn&#x27;t work for my device, but that&#x27;s going off-track.&lt;&#x2F;li&gt;
&lt;li&gt;Since we haven&#x27;t figured out the Android in LXC part yet, the best you could do to check your Gentoo boot, is to reboot into the recovery, fire up adb and check the &lt;code&gt;&#x2F;data&#x2F;gnu&#x2F;var&#x2F;log&#x2F;&lt;&#x2F;code&gt; directory for &lt;code&gt;dmesg&lt;&#x2F;code&gt; or any other logs.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;I plan to merge this entire workflow into SharkBait, so that you don&#x27;t have to go through the hassle of doing it all.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;I should have already mentioned this somewhere, but if I didn&#x27;t, I should tell the readers that all is based on the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.shark-bait.org&#x2F;&quot;&gt;SharkBaitOS&lt;&#x2F;a&gt; established mostly by @KireinaHoro. The &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;KireinaHoro&#x2F;preinit&quot;&gt;&lt;code&gt;preinit&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; I used as a template was the original one from SharkBaitOS. In order to have a better understanding about this project I would recommend the readers to have a look at &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;jsteward.moe&#x2F;&quot;&gt;KireinaHoro&#x27;s Blogs&lt;&#x2F;a&gt; as well.&lt;&#x2F;p&gt;
&lt;p&gt;In my next blog, I will discuss about getting Android 9+ to work inside a LXC-Container, in the Gentoo land. I have yet to achieve doing that myself. Hopefully we will reach there soon.&lt;&#x2F;p&gt;
&lt;p&gt;Until then, Happy Hacking !&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>UART on Xiaomi Redmi Note 7</title>
        <published>2020-06-02T00:00:00+00:00</published>
        <updated>2020-06-02T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Gunwant Jain
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://wantguns.dev/blog/uart-on-lavender/"/>
        <id>https://wantguns.dev/blog/uart-on-lavender/</id>
        
        <content type="html" xml:base="https://wantguns.dev/blog/uart-on-lavender/">&lt;p&gt;This blog is a short sequel to my previous &lt;a href=&quot;https:&#x2F;&#x2F;wantguns.dev&#x2F;blog&#x2F;android-boot-high-jinks&#x2F;&quot;&gt;blog&lt;&#x2F;a&gt; where I discussed why I needed to access a serial console on Redmi Note 7 (I&#x27;ll refer to it using its codename, lavender here onwards). I should give a disclaimer that this blog is one dead-end in the GSoC2020 series. But it could always help newcomers and other curious souls.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;the-need-of-a-serial-console&quot;&gt;The Need of a Serial Console&lt;&#x2F;h2&gt;
&lt;p&gt;My first attempt at porting SharkBait for SAR failed. I was confident about the approach but had trouble finding out what went wrong. If only somehow I could get the kernel logs before my phone went into the bootloop, I could quickly provide fixes.&lt;&#x2F;p&gt;
&lt;p&gt;Fortunately that is when I found &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;wiki.postmarketos.org&#x2F;wiki&#x2F;Xiaomi_Redmi_Note_7_(xiaomi-lavender)&quot;&gt;this article&lt;&#x2F;a&gt; from the awesome guys at PostMarketOS. My device had a serial console built in. Accessing it via UART could provide the logs I required.&lt;&#x2F;p&gt;
&lt;p&gt;So I followed the process described there and disassembled my phone, soldered the required jumper wires to the GPIO pins mentioned in the article and was ready for connecting it to a convertor.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;Please excuse the potato quality of the upcoming images.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;div  class=imageClass &gt;
    &lt;figure  class=center &gt;
        &lt;img src=&quot;smallfull.jpg&quot; alt=&quot;Opening the back&quot;  
            
             class=center  &#x2F;&gt;
        
            &lt;figcaption  class=center  
                &gt;
                Opening the back
            &lt;&#x2F;figcaption&gt;
        
    &lt;&#x2F;figure&gt;
&lt;&#x2F;div&gt;
&lt;div  class=imageClass &gt;
    &lt;figure  class=center &gt;
        &lt;img src=&quot;smallpins.jpg&quot; alt=&quot;GPIO pins&quot;  
            
             class=center  &#x2F;&gt;
        
            &lt;figcaption  class=center  
                &gt;
                Soldered the wires on the GPIO pins
            &lt;&#x2F;figcaption&gt;
        
    &lt;&#x2F;figure&gt;
&lt;&#x2F;div&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;pl2303hxa&quot;&gt;PL2303HXA&lt;&#x2F;h2&gt;
&lt;p&gt;After that, I connected the jumper wires to the PL2303HXA convertor I bought and quickly fired up a &lt;code&gt;screen&lt;&#x2F;code&gt; session, excited to look at the console output.&lt;&#x2F;p&gt;
&lt;p&gt;But there was &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;youtu.be&#x2F;UGSwtv_PKHE&quot;&gt;no output&lt;&#x2F;a&gt;. You can see that the convertor&#x27;s RX LED is blinking when the phone boots up, but there is no output on the console end.&lt;&#x2F;p&gt;
&lt;p&gt;I consulted around with people at PostMarketOS and the SharkBait IRC chat. KireinaHoro asked me to grab a multimeter and check out the voltage the UART operated on. The GPIO pins were at a voltage difference of 1.8V with the ground. I came to the realisation that the PL2303 could not interpret signals with voltage that low. So I decided to buy another convertor, about which I was sure to read signals at 1.8V.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;ft232r&quot;&gt;FT232R&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;div  class=imageClass &gt;
    &lt;figure  class=center &gt;
        &lt;img src=&quot;smallFT232R.jpg&quot; alt=&quot;FT2303R based convertor&quot;  
            
             class=center  &#x2F;&gt;
        
            &lt;figcaption  class=center  
                &gt;
                FT232R based convertor
            &lt;&#x2F;figcaption&gt;
        
    &lt;&#x2F;figure&gt;
&lt;&#x2F;div&gt;
&lt;div  class=imageClass &gt;
    &lt;figure  class=center &gt;
        &lt;img src=&quot;smallfinal.jpg&quot; alt=&quot;FT2303R&quot;  
            
             class=center  &#x2F;&gt;
        
            &lt;figcaption  class=center  
                &gt;
                Final Product
            &lt;&#x2F;figcaption&gt;
        
    &lt;&#x2F;figure&gt;
&lt;&#x2F;div&gt;&lt;&#x2F;p&gt;
&lt;p&gt;With my fingers crossed, I fired up another &lt;code&gt;screen&lt;&#x2F;code&gt; shell, and finally got &lt;em&gt;some&lt;&#x2F;em&gt; output.
But all I got were the logs thrown by the Bootloader. I needed the kernel logs because the &lt;code&gt;init&lt;&#x2F;code&gt; is launched by the kernel. And so yet again, I went to chat with Alexey from PostMarketOS who is working on lavender. He informed me that the vendor&#x27;s downstream kernel for lavender would not give any UART logs for some reason &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;minlexx&#x2F;android_kernel_xiaomi_lavender&#x2F;blob&#x2F;lineage-16.0&#x2F;arch&#x2F;arm&#x2F;boot&#x2F;dts&#x2F;qcom&#x2F;sdm660-pinctrl.dtsi#L69&quot;&gt;(related)&lt;&#x2F;a&gt;. To get the kernel logs via UART, we would have to use the mainline kernel, but that would mean no android for us.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;So I had two options :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Work on bringing UART to lavender by patching the vendor&#x27;s downstream kernel. But this would take a lot of time from a &lt;em&gt;very&lt;&#x2F;em&gt; beginner kernel hacker like me. Also it would be rather too off-topic from my original GSoC journey.&lt;&#x2F;li&gt;
&lt;li&gt;Abandon UART altogether. I had some very hacky debugs in mind which I could use. It would take some time to yield a fruitful result but this was a lower hanging fruit.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;And so, I chose the second option.&lt;&#x2F;p&gt;
&lt;p&gt;Which I am very glad to share, worked out. As of yesterday, I was finally able to boot Gentoo via the preinit, but all that&#x27;s for another blog (coming tomorrow).&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Android Boot High Jinks: And What it Means for SharkBait</title>
        <published>2020-06-01T00:00:00+00:00</published>
        <updated>2020-06-01T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Gunwant Jain
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://wantguns.dev/blog/android-boot-high-jinks/"/>
        <id>https://wantguns.dev/blog/android-boot-high-jinks/</id>
        
        <content type="html" xml:base="https://wantguns.dev/blog/android-boot-high-jinks/">&lt;p&gt;Presently, SharkBait aims at devices launching with Android version lower than 9. I will discuss few ways we could the port this setup to newer devices, whose boot mechanisms are different. We shall also address the boot process of SharkBait and what System-As-Root actually is.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;the-boot-process-of-present-day-sharkbait&quot;&gt;The Boot process of present-day SharkBait&lt;&#x2F;h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Swapping the Android&#x27;s &lt;code&gt;init&lt;&#x2F;code&gt; with &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;sharkbaitOS&#x2F;bootstrap&#x2F;preinit&quot;&gt;&lt;code&gt;preinit&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;We swapped the &lt;code&gt;init&lt;&#x2F;code&gt; executable present in a functioning boot.img with KireinaHoro&#x27;s &lt;code&gt;preinit&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Preinit was responsible for early-mounting partitions and finally switch_root to Gentoo&#x27;s init, thus firing OpenRC.&lt;&#x2F;li&gt;
&lt;li&gt;The &quot;swapping&quot; was essentially replacing a normal Android &lt;code&gt;boot.img&lt;&#x2F;code&gt;&#x27;s &lt;code&gt;ramdisk&lt;&#x2F;code&gt;&#x27;s init with &lt;code&gt;preinit&lt;&#x2F;code&gt;, and then flashing the new &lt;code&gt;boot.img&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;After OpenRC is fired, it starts the lxc.android service.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;The Android lxc container.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Prior to swapping inits, we established an lxc container in the Gentoo userland.&lt;&#x2F;li&gt;
&lt;li&gt;The Android rootfs (at that time it was &lt;strong&gt;ramdisk&lt;&#x2F;strong&gt; &lt;em&gt;inside the boot.img&lt;&#x2F;em&gt;), is extracted in the lxc container&#x27;s rootfs folder.&lt;&#x2F;li&gt;
&lt;li&gt;Android boots inside the container easily.&lt;&#x2F;li&gt;
&lt;li&gt;The lxc container&#x27;s &lt;code&gt;config&lt;&#x2F;code&gt; might provide some insights as well:&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;lxc.uts.name = android&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;lxc.rootfs.path = &#x2F;var&#x2F;lib&#x2F;lxc&#x2F;android&#x2F;rootfs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;lxc.init.cmd = &#x2F;init&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;lxc.net.0.type = none&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;lxc.autodev = 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;lxc.hook.pre-start = &#x2F;var&#x2F;lib&#x2F;lxc&#x2F;android&#x2F;pre-start.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;lxc.hook.post-stop = &#x2F;var&#x2F;lib&#x2F;lxc&#x2F;android&#x2F;post-stop.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;lxc.cgroup.cpu.rt_runtime_us = 950000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This is just a gist of what happened. There was a lot more involved.
Gentoo&#x27;s &lt;code&gt;fstab&lt;&#x2F;code&gt; was tweaked such that it mounted the device blocks and binded them to the container for Android&#x27;s use.
Also KireinHoro managed to make a &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;wiki.gentoo.org&#x2F;wiki&#x2F;Android&#x2F;SharkBait&#x2F;Starting_Android_in_LXC&quot;&gt;working real-time group scheduling model&lt;&#x2F;a&gt; by the use of cgroups.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;changes-in-android-9-devices&quot;&gt;Changes in Android 9+ devices&lt;&#x2F;h2&gt;
&lt;p&gt;Well, Google has made it very confusing to follow their language in the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;source.android.com&#x2F;devices&#x2F;bootloader&#x2F;system-as-root&quot;&gt;AOSP docs&lt;&#x2F;a&gt;, I found that &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;topjohnwu.github.io&#x2F;Magisk&#x2F;boot.html&quot;&gt;Magisk&#x27;s Documentation&lt;&#x2F;a&gt; is very insightful.
Basically, Android Kernels dont use ramdisks as their &lt;code&gt;rootfs&lt;&#x2F;code&gt; now. The &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;source.android.com&#x2F;devices&#x2F;bootloader&#x2F;system-as-root#partition-layouts-nonabdevices&quot;&gt;older ramdisks&lt;&#x2F;a&gt; found inside a &lt;code&gt;boot.img&lt;&#x2F;code&gt; are now merged inside system.img.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;this-poses-some-challenges&quot;&gt;This poses some challenges&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;What do we use now as lxc-container&#x27;s rootfs&lt;&#x2F;li&gt;
&lt;li&gt;If the kernel does not take a ramdisk inside the &lt;code&gt;boot.img&lt;&#x2F;code&gt; as its rootfs, how do we perform the &quot;&lt;code&gt;init&lt;&#x2F;code&gt; &amp;lt;-&amp;gt; &lt;code&gt;preinit&lt;&#x2F;code&gt; swaps&quot;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Turns out Magisk already has some workarounds.&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;magisk-s-approach-to-system-as-root&quot;&gt;Magisk&#x27;s approach to System-As-Root&lt;&#x2F;h3&gt;
&lt;p&gt;In order to circumvent the new system.img-as-rootfs approach, Magisk hexpatches the device&#x27;s Kernel to use the &lt;code&gt;ramdisk&lt;&#x2F;code&gt; inside &lt;code&gt;boot.img&lt;&#x2F;code&gt; as rootfs. The hexpatch essentially is just replacing the &lt;code&gt;skip_initramfs&lt;&#x2F;code&gt; with &lt;code&gt;want_initramfs&lt;&#x2F;code&gt; (could be any 4 lettered word instead as well) from the Kernel commandline. But replacing it from the extracted &lt;code&gt;bootimg.cfg&lt;&#x2F;code&gt; of a &lt;code&gt;initrd.img&lt;&#x2F;code&gt; did not work for me. So I stick to using hexpatching using &lt;code&gt;magiskboot&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Then Magisk patches the original &lt;code&gt;boot.img&lt;&#x2F;code&gt; by adding a new &lt;code&gt;ramdisk.cpio&lt;&#x2F;code&gt; incpio inside it.
The new &lt;code&gt;ramdisk&lt;&#x2F;code&gt; has &lt;code&gt;magiskinit&lt;&#x2F;code&gt; disguised as &lt;code&gt;init&lt;&#x2F;code&gt;.
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;topjohnwu.github.io&#x2F;Magisk&#x2F;deploy.html#systemless&quot;&gt;Source&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; original System-As-Root ramdisk #####&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;	.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; ramdisk after flashing Magisk #######&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;	.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	|&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; .backup&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;	`&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; init&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;code&gt;magiskinit&lt;&#x2F;code&gt; is responsible for :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Early mounting required partitions. On system-as-root devices, we will switch root to system.&lt;&#x2F;li&gt;
&lt;li&gt;Injecting magisk services into &lt;code&gt;init.rc&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Loading sepolicy either from &lt;code&gt;&#x2F;sepolicy&lt;&#x2F;code&gt;, precompiled &lt;code&gt;sepolicy&lt;&#x2F;code&gt; in vendor, or compiling split sepolicy.&lt;&#x2F;li&gt;
&lt;li&gt;Patching sepolicy rules and dump to &lt;code&gt;&#x2F;sepolicy&lt;&#x2F;code&gt; or &lt;code&gt;&#x2F;sbin&#x2F;.se&lt;&#x2F;code&gt; and patching init or &lt;code&gt;libselinux.so&lt;&#x2F;code&gt; to load the patched policies&lt;&#x2F;li&gt;
&lt;li&gt;Executing the original init to start the ordinary boot process&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;This is conceptually somewhat similar to KireinaHoro&#x27;s approach at Preinit.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;my-approach-to-revise-sharkbait&quot;&gt;My approach to revise SharkBait&lt;&#x2F;h2&gt;
&lt;p&gt;I have two approaches. Both approaches have some commonality. We apply the same hexpatch which Magisk applies, to the custom kernel which is already lxc-enabled. This forces the kernel to use the &lt;code&gt;ramdisk&lt;&#x2F;code&gt; inside the &lt;code&gt;boot.img&lt;&#x2F;code&gt; as its &lt;code&gt;rootfs&lt;&#x2F;code&gt;.
Then we package a new &lt;code&gt;boot.img&lt;&#x2F;code&gt; which had KireinaHoro&#x27;s &lt;code&gt;preinit&lt;&#x2F;code&gt; as its &lt;code&gt;init&lt;&#x2F;code&gt;. I assume, this enables the kernel to fire up Gentoo&#x27;s init and eventually start the lxc-container on the way while Gentoo is booting up.&lt;&#x2F;p&gt;
&lt;p&gt;We make the edits to the &lt;code&gt;fstab&lt;&#x2F;code&gt; at the &lt;code&gt;&#x2F;vendor&lt;&#x2F;code&gt; partition (which as you might guess, is another change made by google), in order to provide Android with the correct mounts in Gentoo&#x27;s userland.
Another change made by google was the decision to parse the cgroup mounts using &lt;code&gt;&#x2F;etc&#x2F;cgroups.json&lt;&#x2F;code&gt; instead of the original parsing &lt;code&gt;init.rc&lt;&#x2F;code&gt; approach. &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;source.android.com&#x2F;devices&#x2F;tech&#x2F;perf&#x2F;cgroups&quot;&gt;Source&lt;&#x2F;a&gt;.
Fortunately this might not affect us as we dont need to mount any new cgroup. We make edits in the &lt;code&gt;init.rc&lt;&#x2F;code&gt; for bind-mounting the container&#x27;s pseudofs(s).&lt;&#x2F;p&gt;
&lt;h3 id=&quot;1-w-magisk&quot;&gt;1. w&#x2F; Magisk&lt;&#x2F;h3&gt;
&lt;p&gt;The differences arises in what we use as the &lt;code&gt;rootfs&lt;&#x2F;code&gt; for our lxc-container.
The approach I already followed, required using only magiskinit as the &lt;code&gt;rootfs&lt;&#x2F;code&gt;.
I expected &lt;code&gt;magiskinit&lt;&#x2F;code&gt; to follow its approach and eventually mount all the required device blocks inside the Android userland. Then finally switch to &lt;code&gt;&#x2F;system&lt;&#x2F;code&gt; as the rootdir.
This was the method which failed, causing my device to bootloop.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;2-w-o-magisk-untriaged&quot;&gt;2. w&#x2F;o Magisk (untriaged)&lt;&#x2F;h3&gt;
&lt;p&gt;This approach requires to use entire &lt;code&gt;system.img&lt;&#x2F;code&gt;, extracted, as &lt;code&gt;rootfs&lt;&#x2F;code&gt;.
The &lt;code&gt;init&lt;&#x2F;code&gt; used here is the Android&#x27;s original &lt;code&gt;init&lt;&#x2F;code&gt;.
Since every file required of the merged ramdisk is present in the &lt;code&gt;rootfs&lt;&#x2F;code&gt;, I expect that &lt;code&gt;init&lt;&#x2F;code&gt; fires up smoothly.&lt;&#x2F;p&gt;
&lt;p&gt;Except that since &lt;code&gt;system.img&lt;&#x2F;code&gt; should already be mounted by the kernel in a system-as-root device, We might have to mount it manually. &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;android.googlesource.com&#x2F;platform&#x2F;system&#x2F;core&#x2F;+&#x2F;master&#x2F;init&#x2F;README.md#early-init-boot-sequence&quot;&gt;Source&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;&lt;em&gt;P.S. This article was already written in drafts a few weeks ago, the next paragraphs serve no purpose other than that of history. I will be writing more articles explaining what happened afterwards in order to provide a smoother and realistic reading experience.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Without the use of a serial console, this whole &quot;trace-fest&quot; is difficult to understand. Finding out what went wrong, is on an entirely different level.&lt;&#x2F;p&gt;
&lt;p&gt;We have no dmesg logs as they get overwritten by the recovery boot, which in turn is what I require to check the dmesg logs.
Since the kernel does not panic and the &lt;code&gt;init&lt;&#x2F;code&gt; just &lt;code&gt;exit&lt;&#x2F;code&gt;s, we have no &lt;code&gt;last_kmsg&lt;&#x2F;code&gt; or &lt;code&gt;console-ramoops&lt;&#x2F;code&gt; logs either.
Fortunately spending a lot of time researching I found &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;wiki.postmarketos.org&#x2F;wiki&#x2F;Xiaomi_Redmi_Note_7_(xiaomi-lavender)&quot;&gt;this&lt;&#x2F;a&gt;.
My device has a serial-console baked in. Although accessing it would require taking out the phone&#x27;s glass back, it is worth the fruit.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Installing Gentoo on Android</title>
        <published>2020-04-15T00:00:00+00:00</published>
        <updated>2020-04-15T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Gunwant Jain
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://wantguns.dev/blog/install-gentoo/"/>
        <id>https://wantguns.dev/blog/install-gentoo/</id>
        
        <content type="html" xml:base="https://wantguns.dev/blog/install-gentoo/">&lt;p&gt;I am tired of re-installing gentoo (from an chroot approach) on my phone by connecting parts from different resources and so here is the guide to do it all in a go.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;&lt;em&gt;This guide assumes the prerequisite of a rooted phone. Just fire up an adb shell &#x2F; termux and follow this :&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;First we proceed with downloading the correct &lt;a rel=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;distfiles.gentoo.org&#x2F;experimental&#x2F;arm64&#x2F;&quot;&gt;stage3 tarballs&lt;&#x2F;a&gt;. Copy it in your phone&#x27;s storage.&lt;&#x2F;p&gt;
&lt;p&gt;Then we make a folder for the Gentoo root. Since we are following SharkBait, we will use &lt;code&gt;data&#x2F;gnu&lt;&#x2F;code&gt; as root. Copy the stage3 into it.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;p&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;data&#x2F;gnu&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;cp&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;sdcard&#x2F;stage3-arm64-&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;*&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;data&#x2F;gnu&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;cd&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;data&#x2F;gnu&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Then we extract the stage3&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;tar&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; xpvf&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; stage3-&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;*&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; `&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;--xattrs-include&lt;&#x2F;span&gt;&lt;span&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;*.*&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;`&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt; --numeric-owner&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; no those backticks are not just a content generation error&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;After this we will copy the DNS information in &lt;code&gt;&#x2F;etc&#x2F;resolve.conf&lt;&#x2F;code&gt; so that networking works after entering the new environment.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;cp&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-dereference&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;etc&#x2F;resolv.conf&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;data&#x2F;gnu&#x2F;etc&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Mount the required filesystems:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;cd&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;mount&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;t&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; proc&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; proc&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;data&#x2F;gnu&#x2F;proc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;busybox&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; mount&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-rbind&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;dev&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;data&#x2F;gnu&#x2F;dev&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;busybox&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; mount&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-rbind&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;sys&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;data&#x2F;gnu&#x2F;sys&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Finally we enter the new environment:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;chroot&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;data&#x2F;gnu&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;bin&#x2F;bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;source&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;etc&#x2F;profile&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;export&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; PS1&lt;&#x2F;span&gt;&lt;span&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;(chroot) &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;PS1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add Portage to gid 3003(inet):&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;groupadd&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;g&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt; 3003&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; inet&lt;&#x2F;span&gt;&lt;span&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt; gpasswd&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;a&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; portage&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; inet&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h4 id=&quot;configuring-portage-and-emerging-packages&quot;&gt;Configuring Portage and Emerging Packages:&lt;&#x2F;h4&gt;
&lt;p&gt;These for preventing mount errors while emerging:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;p&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;dev&#x2F;shm&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;mount&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;t&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; tmpfs&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;o&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; nodev,nosuid,noexec,mode=1777,size=6144m&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; tmpfs&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;dev&#x2F;shm&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;mount&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;dev&#x2F;pts&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;o&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; remount,gid=5,mode=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#098658, #B5CEA8);&quot;&gt;620&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Unless you want to stare at your phone for more than 4 hours, or just have a lot of time, I would recommend you to perform these steps while before going to bed, because this takes time. The best approach would be to do all this in a wake-lock(ed) termux session.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;emerge-webrsync&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;emerge&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-ask&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-verbose&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-update&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-deep&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-newuse&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; @world&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h4 id=&quot;configuring-timezone-and-locales&quot;&gt;Configuring Timezone and Locales&lt;&#x2F;h4&gt;
&lt;p&gt;Set your timezone with the correct one from &lt;code&gt;&#x2F;usr&#x2F;share&#x2F;zoneinfo&lt;&#x2F;code&gt; :&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;Asia&#x2F;Calcutta&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;etc&#x2F;timezone&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;emerge&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt;-config&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; sys-libs&#x2F;timezone-data&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Configure locales by uncommenting the correct one from &lt;code&gt;&#x2F;etc&#x2F;locale.gen&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#000000, #D4D4D4); background-color: light-dark(#FFFFFF, #1E1E1E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;locale-gen&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;eselect&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; locale&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; list&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#008000, #6A9955);&quot;&gt; proceed to chose the desired locale&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt;env-update&lt;&#x2F;span&gt;&lt;span&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#795E26, #DCDCAA);&quot;&gt; source&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt; &#x2F;etc&#x2F;profile&lt;&#x2F;span&gt;&lt;span&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#0000FF, #569CD6);&quot;&gt; export&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt; PS1&lt;&#x2F;span&gt;&lt;span&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;(chroot) &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#001080, #9CDCFE);&quot;&gt;PS1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#A31515, #CE9178);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;I believe I have covered the information required until device specific steps. Now the part left is to add your device specific unofficial overlay, or continue with the official one, if your device is enlisted in it. An upcoming guide will guide you to make your kernel for SharkBait and finally, deploy SharkBait. Deploying SharkBait currently is a breeze for devices shipping with Android version lower than 9. Since mine did not, I would have to hack around the current script. If the results turn out to be positive, expect another blog coming up. Till then, Happy Hacking !&lt;&#x2F;p&gt;
</content>
        
    </entry>
</feed>
