<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>pricehiller.com</title><description>The blog and whatever else it may become of Price Hiller.</description><link>https://pricehiller.com/</link><item><title>Private Git Submodule Authentication and Nixos Rebuilds</title><link>https://pricehiller.com/posts/private-git-submodule-authentication-and-nixos-rebuilds</link><guid isPermaLink="true">https://pricehiller.com/posts/private-git-submodule-authentication-and-nixos-rebuilds</guid><description>Resolving authentication issues when using private git submodules and `nixos-rebuild`</description><pubDate>Tue, 03 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h1 id=&quot;a-quick-tip&quot;&gt;&lt;a href=&quot;#a-quick-tip&quot;&gt;A Quick Tip&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;If you are using a private git submodule as an input to a Nix flake and then use that input as part of a NixOS configuration you may end up seeing authentication errors when &lt;code&gt;sudo nixos-rebuild switch&lt;/code&gt; is invoked. This is because in a &lt;em&gt;clean&lt;/em&gt; working tree, Nix will attempt to resolve those submodules to their Git upstreams and check them out from there. &lt;code&gt;sudo nixos-rebuild switch&lt;/code&gt; may drop your environment variable &lt;code&gt;SSH_AUTH_SOCK&lt;/code&gt; and thus the private submodule can’t be checked out as your user’s &lt;code&gt;ssh-agent&lt;/code&gt; can’t provide the credentials for authentication.&lt;/p&gt;
&lt;p&gt;To resolve this you need &lt;code&gt;sudo&lt;/code&gt; to include your user’s &lt;code&gt;SSH_AUTH_SOCK&lt;/code&gt; environment variable into its execution environment.&lt;/p&gt;
&lt;p&gt;Instead of using a plain &lt;code&gt;sudo nixos-rebuild switch&lt;/code&gt;, use &lt;code&gt;sudo --preserve-env=SSH_AUTH_SOCK nixos-rebuild switch&lt;/code&gt;. That should resolve any authentication issues (assuming your &lt;code&gt;ssh-agent&lt;/code&gt;’s auth is valid for the upstream where the Git submodule exists of course).&lt;/p&gt;
&lt;p&gt;You could also set this globally in your NixOS configuration without needing to specify &lt;code&gt;--preserve-env&lt;/code&gt; for &lt;code&gt;sudo&lt;/code&gt; every time via:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-nix&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ts-variable-parameter-builtin&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;security&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;sudo&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;extraConfig&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-string&quot;&gt;    Defaults env_keep+=SSH_AUTH_SOCK&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-string&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;See &lt;a href=&quot;https://www.sudo.ws/docs/man/sudoers.man/&quot;&gt;sudoers(8)&lt;/a&gt; for &lt;code&gt;env_keep&lt;/code&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;I ran into this issue and it sent me on a witch hunt to figure out what was wrong. I’m &lt;em&gt;very&lt;/em&gt; interested as to why you don’t need to send along &lt;code&gt;SSH_AUTH_SOCK&lt;/code&gt; to &lt;code&gt;sudo&lt;/code&gt; when the working tree is dirty. My best guess is that the private submodule gets resolved as a &lt;code&gt;path&lt;/code&gt; &lt;a href=&quot;https://nix.dev/manual/nix/2.34/command-ref/new-cli/nix3-flake.html#flake-references&quot;&gt;flake reference&lt;/a&gt; when the working tree is dirty and otherwise it gets treated as a full on &lt;code&gt;git&lt;/code&gt; reference when it’s clean. So Nix doesn’t &lt;em&gt;need&lt;/em&gt; authentication for the private repository in the first case (treated as a real &lt;code&gt;path&lt;/code&gt;), but does when the input is coerced into a &lt;code&gt;git&lt;/code&gt; reference. Annoying.&lt;/p&gt;
&lt;p&gt;Anyhow — my hope is I’ve saved someone out there a small headache.&lt;/p&gt;</content:encoded></item><item><title>Nix Submodules Haven&apos;t Been Painful for a While</title><link>https://pricehiller.com/posts/nix-submodules-havent-been-painful-for-a-while</link><guid isPermaLink="true">https://pricehiller.com/posts/nix-submodules-havent-been-painful-for-a-while</guid><description>An update to a previous post where I complained some time ago</description><pubDate>Sat, 07 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h1 id=&quot;context&quot;&gt;&lt;a href=&quot;#context&quot;&gt;Context&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Around a year and a half ago I wrote a post complaining about &lt;a href=&quot;https://pricehiller.com/posts/2024-07-26&quot;&gt;Nix and Git Submodules&lt;/a&gt;. That is no longer accurate and hasn’t been for a while. I’ve been kinda forgetting to write this despite a &lt;strong&gt;TODO&lt;/strong&gt; item sitting in my backlog for quite a while.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt; &lt;source srcset=&quot;/assets/static/todo-backlog-nix-submodules-DzILSSn1XnJvSBBMuHZ9_1uDnSu.avif 640w, /assets/static/todo-backlog-nix-submodules-DzILSSn1XnJvSBBMuHZ9_ZgXogg.avif 750w, /assets/static/todo-backlog-nix-submodules-DzILSSn1XnJvSBBMuHZ9_WnjwE.avif 828w, /assets/static/todo-backlog-nix-submodules-DzILSSn1XnJvSBBMuHZ9_2lx8uM.avif 948w&quot; type=&quot;image/avif&quot;&gt;&lt;source srcset=&quot;/assets/static/todo-backlog-nix-submodules-DzILSSn1XnJvSBBMuHZ9_1syHPO.webp 640w, /assets/static/todo-backlog-nix-submodules-DzILSSn1XnJvSBBMuHZ9_Zj34iV.webp 750w, /assets/static/todo-backlog-nix-submodules-DzILSSn1XnJvSBBMuHZ9_UiDtY.webp 828w, /assets/static/todo-backlog-nix-submodules-DzILSSn1XnJvSBBMuHZ9_2jsss7.webp 948w&quot; type=&quot;image/webp&quot;&gt;&lt;source srcset=&quot;/assets/static/todo-backlog-nix-submodules-DzILSSn1XnJvSBBMuHZ9_U0Uzs.jpeg 640w, /assets/static/todo-backlog-nix-submodules-DzILSSn1XnJvSBBMuHZ9_ZQAQzi.jpeg 750w, /assets/static/todo-backlog-nix-submodules-DzILSSn1XnJvSBBMuHZ9_mJQdC.jpeg 828w, /assets/static/todo-backlog-nix-submodules-DzILSSn1XnJvSBBMuHZ9_1KTFbK.jpeg 948w&quot; type=&quot;image/jpeg&quot;&gt;&lt;source srcset=&quot;/assets/static/todo-backlog-nix-submodules-DzILSSn1XnJvSBBMuHZ9_2rWPdh.png 640w, /assets/static/todo-backlog-nix-submodules-DzILSSn1XnJvSBBMuHZ9_Fl33w.png 750w, /assets/static/todo-backlog-nix-submodules-DzILSSn1XnJvSBBMuHZ9_1TGKQr.png 828w, /assets/static/todo-backlog-nix-submodules-DzILSSn1XnJvSBBMuHZ9_Z1LkxYm.png 948w&quot; type=&quot;image/png&quot;&gt;  &lt;img src=&quot;https://pricehiller.com/assets/static/todo-backlog-nix-submodules-DzILSSn1XnJvSBBMuHZ9_Z1LkxYm.png&quot; srcset=&quot;/assets/static/todo-backlog-nix-submodules-DzILSSn1XnJvSBBMuHZ9_2rWPdh.png 640w, /assets/static/todo-backlog-nix-submodules-DzILSSn1XnJvSBBMuHZ9_Fl33w.png 750w, /assets/static/todo-backlog-nix-submodules-DzILSSn1XnJvSBBMuHZ9_1TGKQr.png 828w, /assets/static/todo-backlog-nix-submodules-DzILSSn1XnJvSBBMuHZ9_Z1LkxYm.png 948w&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; alt=&quot;Image showing how long a TODO item to create this very post has been sitting in my backlog&quot; sizes=&quot;(min-width: 948px) 948px, 100vw&quot; data-astro-image=&quot;constrained&quot; data-astro-image-fit=&quot;cover&quot; data-astro-image-pos=&quot;center&quot; width=&quot;948&quot; height=&quot;27&quot;&gt; &lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;Yeah, it’s been 301 days since I made a note to write this. I’m lazy I guess.&lt;/p&gt;
&lt;h1 id=&quot;wait-so-what-changed&quot;&gt;&lt;a href=&quot;#wait-so-what-changed&quot;&gt;Wait, so what changed?&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Since &lt;a href=&quot;https://github.com/NixOS/nix/commit/25fcc8d1aba201cb8d84d29a1f7a40b8fb1a0ce5&quot;&gt;February 4th, 2025&lt;/a&gt;, you can set &lt;code&gt;input.self.submodules = true;&lt;/code&gt; in a Nix Flake and it will include your submodules as part of the Nix builds, fetches, etc.&lt;/p&gt;
&lt;p&gt;It had a few bugs here and there for a month or two afterwards where it occasionally broke, but for a good while now it’s been rock solid. All of my complaints about needing to pass &lt;code&gt;.?submodules=1&lt;/code&gt; to the end of various Nix commands were rendered invalid since then.&lt;/p&gt;
&lt;h1 id=&quot;an-example&quot;&gt;&lt;a href=&quot;#an-example&quot;&gt;An Example&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;So let’s say you have a Nix Flake in a Git repository that depends on submodules. For example, let’s say you use &lt;a href=&quot;https://github.com/ryantm/agenix&quot;&gt;Agenix&lt;/a&gt;, &lt;a href=&quot;https://github.com/Mic92/sops-nix&quot;&gt;Sops-Nix&lt;/a&gt;, or some other secrets management that stores those secrets in the repository. Currently, the recommendation is to just encrypt those secrets and leave the encrypted files publicly visible. I think that came straight from the &lt;em&gt;bad idea fairy&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Let’s say we wanted to be a little more cautious and stop &lt;a href=&quot;https://en.wikipedia.org/wiki/Harvest_now,_decrypt_later&quot;&gt;Harvest now, decrypt later&lt;/a&gt; strategies from working against us. A good strategy then, is to store the secrets outside of the public repository in a separate, private, Git repository and then pull those secrets in by adding them as a Git submodule to the public repository. I’ve done exactly that in &lt;a href=&quot;https://github.com/priceHiller/dots&quot;&gt;my Nix config&lt;/a&gt;, see the &lt;code&gt;secrets&lt;/code&gt; submodule — it’s a private submodule so random folks can’t just download my secrets and wait until a possible vulnerability crops up in &lt;a href=&quot;https://github.com/FiloSottile/age&quot;&gt;Age&lt;/a&gt; and then harvest everything I have in there.&lt;/p&gt;
&lt;p&gt;So, what I do now is simply add &lt;code&gt;self.submodules&lt;/code&gt; to my Nix Flake inputs and use the secrets as a path input, &lt;a href=&quot;https://github.com/PriceHiller/dots/blob/71089cd357a3d677914199bff91a9d541996f773/flake.nix#L73-L81&quot;&gt;over here&lt;/a&gt;. This works great! Public users can still browse my slop repository with all its sharp edges and terrible abstractions without being able to copy down even encrypted secrets.&lt;/p&gt;
&lt;details&gt;&lt;summary&gt;Here’s a snippet of that Flake if you don’t want to browse:&lt;/summary&gt;&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-nix&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;inputs&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;details&gt;&lt;summary data-indent=&quot;    &quot;&gt;(69 lines hidden)&lt;/summary&gt;&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;nix&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;git+https://github.com/nixos/nix?shallow=1&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;deploy-rs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;github:serokell/deploy-rs&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;nixos-facter-modules&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;github:nix-community/nixos-facter-modules&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;nixos-hardware&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;github:NixOS/nixos-hardware/master&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;git+https://github.com/NixOS/nixpkgs?shallow=1&amp;#x26;ref=nixos-unstable&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;nixpkgs-unstable&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;git+https://github.com/NixOS/nixpkgs?shallow=1&amp;#x26;ref=nixpkgs-unstable&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;nixpkgs-stable&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;git+https://github.com/NixOS/nixpkgs?shallow=1&amp;#x26;ref=nixos-25.11&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;harmonia&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;github:nix-community/harmonia&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;nix-post-build-hook-queue&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;github:newam/nix-post-build-hook-queue&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;follows&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;treefmt&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;follows&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;hyprland&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;git+https://github.com/hyprwm/Hyprland?shallow=1&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;fenix&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;github:nix-community/fenix&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;follows&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;lanzaboote&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;github:nix-community/lanzaboote&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;home-manager&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;github:nix-community/home-manager&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;follows&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;agenix&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;github:yaxitech/ragenix&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;follows&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;impermanence&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;github:nix-community/impermanence&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;disko&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;github:nix-community/disko&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;follows&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;blog&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;git+https://git.pricehiller.com/price/Blog&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;treefmt-nix&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;github:numtide/treefmt-nix&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;apple-emoji-linux&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;github:samuelngs/apple-emoji-linux&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;neovim-nightly-overlay&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;github:nix-community/neovim-nightly-overlay&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;inputs&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;follows&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;rofi-tools&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;github:szaffarano/rofi-tools&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;inputs&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;follows&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;zsh-completions&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;github:zsh-users/zsh-completions&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;flake&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;oisd-blocklist&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;github:sjhgvr/oisd&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;flake&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;copyparty&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;github:9001/copyparty&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;inputs&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;follows&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;nixcord&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;github:kaylorben/nixcord&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;/details&gt;&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;submodules&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;secrets&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string-special&quot;&gt;./secrets&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;inputs&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;follows&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;agenix&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;follows&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;agenix&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;treefmt-nix&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;follows&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;treefmt-nix&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;details&gt;&lt;summary data-indent=&quot;  &quot;&gt;(248 lines hidden)&lt;/summary&gt;&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-function&quot;&gt;outputs&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-parameter&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-operator&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter-builtin&quot;&gt;...&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-keyword&quot;&gt;let&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-keyword&quot;&gt;inherit&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt; outputs&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-function&quot;&gt;forAllSystems&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-parameter&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        nixpkgs&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;lib&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-function&quot;&gt;genAttrs&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;aarch64-linux&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;i686-linux&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;x86_64-linux&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;aarch64-darwin&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;x86_64-darwin&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-variable-parameter&quot;&gt;system&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-variable&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-keyword-import&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;nixpkgs&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-keyword&quot;&gt;inherit&lt;/span&gt; system&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-variable-member&quot;&gt;overlays&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  inputs&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;agenix&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;overlays&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;default&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  self&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;overlays&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;modifications&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  self&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;overlays&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;additions&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      treefmtEval &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;forAllSystems&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-variable-parameter&quot;&gt;pkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;:&lt;/span&gt; inputs&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;treefmt-nix&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;lib&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-function&quot;&gt;evalModule&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;pkgs&lt;/span&gt; &lt;span class=&quot;ts-string-special&quot;&gt;./treefmt.nix&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-keyword&quot;&gt;in&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;formatter&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-function&quot;&gt;forAllSystems&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-parameter&quot;&gt;pkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;treefmtEval&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;${&lt;/span&gt;pkgs&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;stdenv&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;hostPlatform&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;system&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;config&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;build&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;wrapper&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;packages&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-function&quot;&gt;forAllSystems&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-parameter&quot;&gt;pkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-keyword&quot;&gt;let&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          bootstrapISO &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; self&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nixosConfigurations&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;bootstrapper&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;config&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;system&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;build&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;isoImage&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-keyword&quot;&gt;in&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-keyword&quot;&gt;inherit&lt;/span&gt; bootstrapISO&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;default&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;bootstrapISO&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;overlays&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-keyword-import&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;ts-string-special&quot;&gt;./overlays&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;ts-keyword&quot;&gt;inherit&lt;/span&gt; inputs&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;apps&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-function&quot;&gt;forAllSystems&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-variable-parameter&quot;&gt;pkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;default&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;app&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;meta&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;description&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;Run nixos-rebuild switch&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;program&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-variable&quot;&gt;pkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-function&quot;&gt;writeShellApplication&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-variable-member&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;nixos-rebuild-wrapper&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-variable-member&quot;&gt;runtimeInputs&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-keyword&quot;&gt;with&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;pkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-variable&quot;&gt;nix-output-monitor&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-variable&quot;&gt;nixos-rebuild&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-variable&quot;&gt;hostname&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-variable-member&quot;&gt;text&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-string&quot;&gt;                MSG=&quot;Switching to NixOS configuration: &apos;$(hostname)&apos;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-string&quot;&gt;                HEADER=$(printf &quot;%&lt;/span&gt;&apos;&apos;&lt;span class=&quot;ts-string&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;{#MSG}s\n&quot; | tr &apos; &apos; &quot;=&quot;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-string&quot;&gt;                echo&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-string&quot;&gt;                echo &quot;$HEADER&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-string&quot;&gt;                echo &quot;$MSG&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-string&quot;&gt;                echo &quot;$HEADER&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-string&quot;&gt;                echo&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-string&quot;&gt;                sudo nixos-rebuild switch --flake &quot;.#$(hostname)&quot; --accept-flake-config |&amp;#x26; nom&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-string&quot;&gt;              &lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            |&lt;span class=&quot;ts-operator&quot;&gt;&gt;&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;pkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;lib&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;getExe&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;repl&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;app&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;meta&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;description&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;Launch interactive repl to inspect config&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;program&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-variable&quot;&gt;pkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-function&quot;&gt;writeShellApplication&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-variable-member&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;inspect-flake&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-variable-member&quot;&gt;runtimeInputs&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-keyword&quot;&gt;with&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;pkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-variable&quot;&gt;git&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-variable-member&quot;&gt;text&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-string&quot;&gt;                nix repl --file &quot;$(git rev-parse --show-toplevel)&quot;/repl.nix&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-string&quot;&gt;              &lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            |&lt;span class=&quot;ts-operator&quot;&gt;&gt;&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;pkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;lib&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;getExe&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;devShells&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-function&quot;&gt;forAllSystems&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-variable-parameter&quot;&gt;pkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;default&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;pkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-function&quot;&gt;mkShell&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;packages&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-keyword&quot;&gt;with&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;pkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-variable&quot;&gt;age&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-variable&quot;&gt;agenix&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-variable&quot;&gt;age-plugin-yubikey&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-variable&quot;&gt;nixos-rebuild&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-variable&quot;&gt;nixos-install-tools&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-variable&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;deploy-rs&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;packages&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;${&lt;/span&gt;pkgs&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;stdenv&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;hostPlatform&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;system&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;deploy-rs&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;shellHook&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-string&quot;&gt;            &lt;/span&gt;&lt;span class=&quot;ts-keyword-import&quot;&gt;export&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt; &lt;/span&gt;&lt;span class=&quot;ts-constant&quot;&gt;RULES&lt;/span&gt;&lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;ts-variable-builtin&quot;&gt;PWD&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/secrets/secrets.nix&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-string&quot;&gt;          &lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;checks&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-function&quot;&gt;forAllSystems&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-variable-parameter&quot;&gt;pkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;formatting&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;treefmtEval&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;${&lt;/span&gt;pkgs&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;stdenv&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;hostPlatform&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;system&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;config&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;build&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-function&quot;&gt;check&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;nixosConfigurations&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-keyword&quot;&gt;let&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          clib &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-keyword-import&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;ts-string-special&quot;&gt;./lib&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;ts-variable-member&quot;&gt;lib&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; nixpkgs&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;lib&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-keyword&quot;&gt;in&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;orion&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-keyword&quot;&gt;let&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              hostname &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;orion&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-keyword&quot;&gt;in&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-variable&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;lib&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-function&quot;&gt;nixosSystem&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-variable-member&quot;&gt;specialArgs&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-keyword&quot;&gt;inherit&lt;/span&gt; self&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-keyword&quot;&gt;inherit&lt;/span&gt; inputs&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-keyword&quot;&gt;inherit&lt;/span&gt; outputs&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-keyword&quot;&gt;inherit&lt;/span&gt; hostname&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-keyword&quot;&gt;inherit&lt;/span&gt; clib&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-variable-member&quot;&gt;modules&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-keyword&quot;&gt;let&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  age-secrets &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                    &lt;span class=&quot;ts-variable-member&quot;&gt;config&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; inputs&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;secrets&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;secrets&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;hostname&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-keyword&quot;&gt;in&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-string-special&quot;&gt;./modules/nixos/base-programs.nix&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-string-special&quot;&gt;./modules/nixos/btrfs-rollback.nix&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-string-special&quot;&gt;./modules/nixos/grafana-alloy.nix&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-string-special&quot;&gt;./modules/nixos/vector.nix&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-string-special&quot;&gt;./modules/nixos/logviewer.nix&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-string-special&quot;&gt;./modules/nixos/persistence.nix&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-string-special&quot;&gt;./modules/nixos/dns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-variable&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;home-manager&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nixosModules&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;home-manager&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                    &lt;span class=&quot;ts-variable-member&quot;&gt;home-manager&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                      &lt;span class=&quot;ts-variable-member&quot;&gt;sharedModules&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                        &lt;span class=&quot;ts-variable&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;agenix&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;homeManagerModules&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;default&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                        &lt;span class=&quot;ts-variable&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nixcord&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;homeModules&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;nixcord&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                        &lt;span class=&quot;ts-variable&quot;&gt;age-secrets&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                        &lt;span class=&quot;ts-string-special&quot;&gt;./modules/hm/link-file.nix&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                      &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                      &lt;span class=&quot;ts-variable-member&quot;&gt;backupFileExtension&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;hm.backup&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                      &lt;span class=&quot;ts-variable-member&quot;&gt;extraSpecialArgs&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                        &lt;span class=&quot;ts-variable-member&quot;&gt;clib&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-keyword-import&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;ts-string-special&quot;&gt;./lib&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;ts-variable-member&quot;&gt;lib&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;lib&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                        &lt;span class=&quot;ts-keyword&quot;&gt;inherit&lt;/span&gt; inputs&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                      &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                      &lt;span class=&quot;ts-variable-member&quot;&gt;useGlobalPkgs&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                      &lt;span class=&quot;ts-variable-member&quot;&gt;useUserPackages&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                      &lt;span class=&quot;ts-variable-member&quot;&gt;users&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;price&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-keyword-import&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;ts-string-special&quot;&gt;./users/price/home.nix&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-variable&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nix-post-build-hook-queue&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nixosModules&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;default&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-variable&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nixos-facter-modules&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nixosModules&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;facter&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-variable&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nixos-hardware&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nixosModules&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;dell-xps-15-9530&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-variable&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;lanzaboote&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nixosModules&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;lanzaboote&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-variable&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;impermanence&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nixosModules&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;impermanence&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-variable&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;agenix&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nixosModules&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;default&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-variable&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;disko&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nixosModules&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;disko&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                    &lt;span class=&quot;ts-variable-member&quot;&gt;config&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                      &lt;span class=&quot;ts-variable-member&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;overlays&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                        &lt;span class=&quot;ts-variable&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;neovim-nightly-overlay&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;overlays&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;default&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                        &lt;span class=&quot;ts-variable&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nix-post-build-hook-queue&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;overlays&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;default&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                        &lt;span class=&quot;ts-variable&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;overlays&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;modifications&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                        &lt;span class=&quot;ts-variable&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;overlays&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;additions&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                      &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-variable&quot;&gt;age-secrets&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-string-special&quot;&gt;./hosts/&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;hostname&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;luna&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-keyword&quot;&gt;let&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              hostname &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;luna&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-keyword&quot;&gt;in&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-variable&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;lib&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-function&quot;&gt;nixosSystem&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-variable-member&quot;&gt;specialArgs&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-keyword&quot;&gt;inherit&lt;/span&gt; self&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-keyword&quot;&gt;inherit&lt;/span&gt; inputs&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-keyword&quot;&gt;inherit&lt;/span&gt; hostname&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-keyword&quot;&gt;inherit&lt;/span&gt; nixpkgs&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-keyword&quot;&gt;inherit&lt;/span&gt; clib&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-variable-member&quot;&gt;modules&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-string-special&quot;&gt;./modules/nixos/btrfs-rollback.nix&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-string-special&quot;&gt;./modules/nixos/mail.nix&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-string-special&quot;&gt;./modules/nixos/grafana-alloy.nix&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-string-special&quot;&gt;./modules/nixos/openssh.nix&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-string-special&quot;&gt;./modules/nixos/base-programs.nix&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-string-special&quot;&gt;./modules/nixos/vector.nix&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-string-special&quot;&gt;./modules/nixos/persistence.nix&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-string-special&quot;&gt;./modules/nixos/dns&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-variable&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nixos-facter-modules&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nixosModules&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;facter&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-variable&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;impermanence&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nixosModules&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;impermanence&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-variable&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;agenix&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nixosModules&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;default&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-variable&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;disko&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nixosModules&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;disko&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-variable&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;harmonia&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nixosModules&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;harmonia&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-variable&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;copyparty&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nixosModules&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;default&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-variable-member&quot;&gt;config&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;secrets&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;secrets&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;hostname&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-string-special&quot;&gt;./hosts/&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;hostname&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;bootstrapper&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-keyword&quot;&gt;let&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              hostname &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;bootstrapper&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-keyword&quot;&gt;in&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-variable&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;lib&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-function&quot;&gt;nixosSystem&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-variable-member&quot;&gt;specialArgs&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-keyword&quot;&gt;inherit&lt;/span&gt; self&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-keyword&quot;&gt;inherit&lt;/span&gt; inputs&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-keyword&quot;&gt;inherit&lt;/span&gt; hostname&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-keyword&quot;&gt;inherit&lt;/span&gt; nixpkgs&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-keyword&quot;&gt;inherit&lt;/span&gt; clib&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-variable-member&quot;&gt;modules&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-string-special&quot;&gt;./modules/nixos/openssh.nix&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-string-special&quot;&gt;./modules/nixos/base-programs.nix&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-variable-member&quot;&gt;config&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                    &lt;span class=&quot;ts-variable-member&quot;&gt;nixpkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;overlays&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                      &lt;span class=&quot;ts-variable&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;neovim-nightly-overlay&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;overlays&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;default&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                    &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                  &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;                &lt;span class=&quot;ts-string-special&quot;&gt;./hosts/&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;hostname&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;deploy&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;nodes&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-keyword&quot;&gt;let&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          deploy-rs &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; inputs&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;deploy-rs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-keyword&quot;&gt;in&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;luna&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-variable-member&quot;&gt;hostname&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;luna.hosts.pricehiller.com&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-variable-member&quot;&gt;fastConnection&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-variable-member&quot;&gt;profiles&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;system&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-variable-member&quot;&gt;sshUser&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;root&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;              &lt;span class=&quot;ts-variable-member&quot;&gt;path&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;deploy-rs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;lib&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;x86_64-linux&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;activate&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-function&quot;&gt;nixos&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;outputs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nixosConfigurations&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;luna&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;/details&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/details&gt;
&lt;p&gt;If you’re keeping your encrypted secrets in a publicly visible repository, consider vendoring those out to an external Git repository and pulling ‘em back in as a Git submodule.&lt;/p&gt;
&lt;p&gt;Anyhow, I can now cross that way overdue item off my TODO list.&lt;/p&gt;</content:encoded></item><item><title>Using a Nix Attrset to specify Librewolf settings</title><link>https://pricehiller.com/posts/using-a-nix-attrset-to-specify-librewolf-settings</link><guid isPermaLink="true">https://pricehiller.com/posts/using-a-nix-attrset-to-specify-librewolf-settings</guid><description>The Nix Home Manager module for Librewolf uses path-like strings for settings — I wanted to use attrsets so I set out to make it happen.</description><pubDate>Fri, 07 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;h1 id=&quot;a-minor-nuisance-is-discovered&quot;&gt;&lt;a href=&quot;#a-minor-nuisance-is-discovered&quot;&gt;A minor nuisance is discovered&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;I was tinkering with my Nix config and ended up going through my &lt;a href=&quot;https://github.com/PriceHiller/dots/blob/0f3cfaa30909d425b3e68a93df47396acd4c33b1/users/price/conf/librewolf/default.nix&quot;&gt;Librewolf&lt;/a&gt; configuration. I realized that the settings in the &lt;a href=&quot;https://github.com/nix-community/home-manager/blob/master/modules/programs/librewolf.nix&quot;&gt;Librewolf Home Manager module&lt;/a&gt; do not support Nix attrsets. That bothered me.&lt;/p&gt;
&lt;p&gt;For your eyes, here was how I had Librewolf configured during that session:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-nix&quot;&gt;&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-comment&quot;&gt;# ... snip ...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable&quot;&gt;programs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-function&quot;&gt;librewolf&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;enable&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;settings&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;webgl.disabled&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;privacy.clearOnShutdown.history&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;privacy.clearOnShutdown.downloads&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;privacy.clearOnShutdown.cookies&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;network.cookie.lifetimePolicy&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;network.trr.mode&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;network.trr.uri&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;https://dns.mullvad.net/dns-query&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;network.trr.default_provider_uri&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;https://dns10.quad9.net/dns-query&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;network.trr.strict_native_fallback&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;network.trr.retry_on_recoverable_errors&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;network.trr.disable-heuristics&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;network.trr.allow-rfc1918&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-comment&quot;&gt;# ... snip ...&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Notice all the string paths like &lt;code&gt;&quot;network.trr.mode&quot;&lt;/code&gt;, &lt;code&gt;&quot;network.trr.uri&quot;&lt;/code&gt;, and so on. Nix has these beautiful things called attrsets (in fact, the &lt;code&gt;programs.librewolf&lt;/code&gt; stuff itself &lt;em&gt;is&lt;/em&gt; an attrset), here’s an example:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-nix&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;hello&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;world&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;nested&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;item&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Notice that the &lt;code&gt;nested.path.item&lt;/code&gt; looks an awful lot like &lt;code&gt;&quot;network.trr.mode&quot;&lt;/code&gt; and the other string paths in the Librewolf settings.&lt;/p&gt;
&lt;p&gt;So! It got me thinking, I don’t really like repeating the same &lt;code&gt;&quot;network.trr.mode&lt;/code&gt; and whatnot over and over; furthermore, those strings make it a pain to organize those settings under their parents. Meaning I can’t just have all of Librewolf’s network settings hanging out under a &lt;code&gt;network&lt;/code&gt; top level key.&lt;/p&gt;
&lt;p&gt;I wanted to set those paths in an attrset — I &lt;em&gt;needed&lt;/em&gt; to set those paths in an attrset.&lt;/p&gt;
&lt;p&gt;What I wanted to do was set my Librewolf configuration like so:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-nix&quot;&gt;&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-comment&quot;&gt;# ... snip ...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable&quot;&gt;programs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-function&quot;&gt;librewolf&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;enable&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;settings&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;webgl&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;disabled&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;privacy&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;clearOnShutdown&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;history&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;downloads&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;cookies&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;network&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;cookie&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;lifetimePolicy&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;trr&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;mode&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;uri&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;https://dns.mullvad.net/dns-query&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;default_provider_uri&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;https://dns10.quad9.net/dns-query&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;strict_native_fallback&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;retry_on_recoverable_errors&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;disable-heuristics&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;allow-rfc1918&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-comment&quot;&gt;# ... snip ...&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here’s the key though, that attrset has to be converted back to the string paths we saw earlier as that’s what the Home Manager module requires for the settings.&lt;/p&gt;
&lt;h1 id=&quot;writing-a-function-to-convert-an-attrset-to-a-flattened-bunch-of-string-paths&quot;&gt;&lt;a href=&quot;#writing-a-function-to-convert-an-attrset-to-a-flattened-bunch-of-string-paths&quot;&gt;Writing a function to convert an attrset to a flattened bunch of string paths&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Here’s what I cooked up (probably still pink and raw in the center, eat at your own risk) and I’ll show it mostly in its full, hideous, glory:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-nix&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;lib&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter-builtin&quot;&gt;...&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-keyword&quot;&gt;let&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-comment&quot;&gt;# Converts an attrset to the string representation of its paths&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-comment&quot;&gt;#   {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-comment&quot;&gt;#     hello = { world = true; };&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-comment&quot;&gt;#     goodbye = { moon = &quot;bye&quot;; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-comment&quot;&gt;#   }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-comment&quot;&gt;#     Becomes&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-comment&quot;&gt;#   {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-comment&quot;&gt;#     &quot;hello.world&quot; = true;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-comment&quot;&gt;#     &quot;goodbye.moon&quot; = &quot;bye&quot;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-comment&quot;&gt;#   }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-comment&quot;&gt;#     Works for arbitrarily nested attrsets&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-function&quot;&gt;attrsToStringPath&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-parameter&quot;&gt;attrs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-keyword&quot;&gt;let&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-function&quot;&gt;_attrsToStringPath&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-parameter&quot;&gt;_parent&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-keyword&quot;&gt;let&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          parent &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ts-function-builtin&quot;&gt;isNull&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;_parent&lt;/span&gt; &lt;span class=&quot;ts-keyword&quot;&gt;then&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;_parent&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-keyword&quot;&gt;in&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-parameter&quot;&gt;attrs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        lib&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;attrsets&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-function&quot;&gt;foldlAttrs&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-parameter&quot;&gt;acc&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;_name&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-keyword&quot;&gt;let&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            name &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;parent&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;_name&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-keyword&quot;&gt;in&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-parameter&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable&quot;&gt;acc&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ts-constant-builtin&quot;&gt;builtins&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-function&quot;&gt;isAttrs&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;ts-keyword&quot;&gt;then&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;_attrsToStringPath&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;ts-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;attrs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-keyword&quot;&gt;in&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable&quot;&gt;_attrsToStringPath&lt;/span&gt; &lt;span class=&quot;ts-constant-builtin&quot;&gt;null&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;attrs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-keyword&quot;&gt;in&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;programs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;librewolf&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;enable&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;settings&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-function&quot;&gt;attrsToStringPath&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;ts-comment&quot;&gt;# &amp;#x3C;========= THIS LINE IS IMPORTANT, this is where the function is used!&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;webgl&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;disabled&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;privacy&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;clearOnShutdown&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;history&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;downloads&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;cookies&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;network&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;cookie&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;lifetimePolicy&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;trr&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;mode&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;uri&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;https://dns.mullvad.net/dns-query&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;default_provider_uri&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;https://dns10.quad9.net/dns-query&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;strict_native_fallback&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;retry_on_recoverable_errors&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;disable-heuristics&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-variable-member&quot;&gt;allow-rfc1918&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;By abusing recursion we slowly accumulate and build our full string paths together for each value. Now I have some small piece of mind that I can go nuts with my attrset fun in my config.&lt;/p&gt;
&lt;p&gt;Maybe someone out there will find this useful or look at this and go “they know that’s built into &lt;code&gt;nixpkgs.lib&lt;/code&gt; right?” To that person I say this: I keep a cookie jar of lead chips around to snack on.&lt;/p&gt;</content:encoded></item><item><title>The Withering Fucking Pain of Nix and Git Submodules</title><link>https://pricehiller.com/posts/the-withering-fucking-pain-of-nix-and-git-submodules</link><guid isPermaLink="true">https://pricehiller.com/posts/the-withering-fucking-pain-of-nix-and-git-submodules</guid><description>Nix&apos;s Git submodule support is awful. More than awful, it&apos;s fundamentally broken.</description><pubDate>Fri, 26 Jul 2024 00:00:00 GMT</pubDate><content:encoded>&lt;h1 id=&quot;context&quot;&gt;&lt;a href=&quot;#context&quot;&gt;Context&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;I have now spent an ungodly amount of time trying to get my Nix build for my blog to work with a Treesitter syntax parser. I am now declaring defeat. Fuck that.&lt;/p&gt;
&lt;p&gt;The first bone to pick is that Nix’s Git submodule support is utterly, &lt;em&gt;utterly&lt;/em&gt;, busted. Like, see &lt;a href=&quot;https://github.com/NixOS/nix/issues/9708&quot;&gt;here&lt;/a&gt;. That’s recent relative to this post, but these sorts of issues around Git submodules are a constant affair when it comes to Nix flakes. There’s one of two primary crapalicious ways of getting around this. There are more, but I’m choosing to stick to the two actually good solutions if you’re dead set on using Git submodules.&lt;/p&gt;
&lt;h1 id=&quot;the-first-and-worse-of-the-two-workaround&quot;&gt;&lt;a href=&quot;#the-first-and-worse-of-the-two-workaround&quot;&gt;The first (and worse of the two) workaround&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;When you invoke &lt;code&gt;nix build&lt;/code&gt;, invoke it with &lt;code&gt;nix build &apos;.?submodules=1&apos;&lt;/code&gt; which &lt;em&gt;should&lt;/em&gt; bring the git submodules along for the ride assuming they’re actually checked out.&lt;/p&gt;
&lt;p&gt;This is awful. Actually, genuinely, terrible. Now any time I want to build the given project I have to remember to add in some extra arguments in my invocations to ensure dependencies are pulled into the build. Just what the fuck? Why is this considered an acceptable design? Half the reason behind me using Nix in the first place is so dependencies take care of themselves and reproducibility is easily achieved. By having to remember to pass in &lt;code&gt;&apos;.?submodules=1&apos;&lt;/code&gt;, I’m now worrying about dependencies that ideally should be handled in the code itself.&lt;/p&gt;
&lt;p&gt;And guess what? Any downstream usage of the flake elsewhere will also now have to call all their commands with &lt;code&gt;&apos;.?submodules=1&apos;&lt;/code&gt; as far as I can tell. Lovely. It pollutes out beyond just the single project, it screws up all of ‘em.&lt;/p&gt;
&lt;p&gt;That ain’t gonna cut it, trash.&lt;/p&gt;
&lt;h1 id=&quot;the-second-and-somewhat-better-but-still-crappy-workaround&quot;&gt;&lt;a href=&quot;#the-second-and-somewhat-better-but-still-crappy-workaround&quot;&gt;The second (and somewhat better, but still crappy) workaround&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;So another way of doing this is to define an additional input in my &lt;code&gt;flake.nix&lt;/code&gt; like so:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-nix&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;inputs&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;src-with-submodules&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;flake&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;git+file:./.?submodules=1&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-function&quot;&gt;outputs&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;src-with-submodules&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-comment&quot;&gt;#... building derivations and whatever else&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And then in all my output derivations if they need the submodules instead of referencing say a local path like &lt;code&gt;./.&lt;/code&gt;, reference in the &lt;code&gt;src-with-submodules&lt;/code&gt; input instead. This still kinda sucks as now I have to keep that in mind when writing any Nix modules/code and it’s very much &lt;em&gt;not&lt;/em&gt; typical to do that.&lt;/p&gt;
&lt;h1 id=&quot;my-issue&quot;&gt;&lt;a href=&quot;#my-issue&quot;&gt;My issue&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;I used the second approach to pull in my Git submodules. Now to be clear, my Blog, at the time of writing, is made of twine, nearly snapping twigs, duct tape, and prayers. It ain’t well written at &lt;em&gt;all&lt;/em&gt; and that includes the Nix flake. I admit that.&lt;/p&gt;
&lt;p&gt;Still, even with that caveat, my &lt;code&gt;cargo run&lt;/code&gt; invocation, even when fully offline after vendoring dependencies, works correctly. My precious syntax highlighting from Treesitter gets applied as expected. Under a &lt;code&gt;nix build&lt;/code&gt;? Nope. Not in any way I’ve tried. If someone out there wants to hit me up and call me a dumbass, please feel free — but while you’re doing that shoot me a solution. I’ll do some downright &lt;em&gt;strange&lt;/em&gt; things for a proper solution right now.&lt;/p&gt;
&lt;h1 id=&quot;maintaining-the-status-quo&quot;&gt;&lt;a href=&quot;#maintaining-the-status-quo&quot;&gt;Maintaining the Status Quo&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Are my failures probably related to incompetence on my part? Yup, prob-a-lee. Still, I’m tired. So &lt;strong&gt;&lt;em&gt;very&lt;/em&gt;&lt;/strong&gt; tired of fucking with it. It’s just syntax highlighting. I give up. Maybe I’ll come back to it another day and finally work out how to correctly do it. For now though, fuck it. Sublime syntax highlighting will have to do.&lt;/p&gt;</content:encoded></item><item><title>Avoiding Collisions in Hash Tables</title><link>https://pricehiller.com/posts/avoiding-collisions-in-hash-tables</link><guid isPermaLink="true">https://pricehiller.com/posts/avoiding-collisions-in-hash-tables</guid><description>We don&apos;t do &quot;performance&quot; &apos;round here.</description><pubDate>Mon, 29 Apr 2024 00:00:00 GMT</pubDate><content:encoded>&lt;h1 id=&quot;a-quick-intro-to-hash-tables-and-collisions&quot;&gt;&lt;a href=&quot;#a-quick-intro-to-hash-tables-and-collisions&quot;&gt;A Quick Intro to Hash Tables and Collisions&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;A hash table maps a unique input to a value most typically stored in an array.&lt;/p&gt;
&lt;p&gt;The goal of a hash table is to take advantage of a hash function that produces a position within an array where a given value might be stored for a unique key. This allows fast lookups into the array for the given key.&lt;/p&gt;
&lt;p&gt;An example hash table of names to weight might be:&lt;/p&gt;

























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Key (name)&lt;/th&gt;&lt;th&gt;Value (weight)&lt;/th&gt;&lt;th&gt;Position in Array&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Xavier&lt;/td&gt;&lt;td&gt;202&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sam&lt;/td&gt;&lt;td&gt;150&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Preston&lt;/td&gt;&lt;td&gt;168&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Where the values (with their keys) are stored in an array like so:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;key&gt;,&lt;/key&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;key&gt;&lt;value&gt;┌───────────────────────────────────────┐&lt;/value&gt;&lt;/key&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;key&gt;&lt;value&gt;│Xavier, 202 |  Sam, 150  | Preston, 168│&lt;/value&gt;&lt;/key&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;key&gt;&lt;value&gt;└───────────────────────────────────────┘&lt;/value&gt;&lt;/key&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;key&gt;&lt;value&gt;       0           1             2&lt;/value&gt;&lt;/key&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When we do a lookup into that hash table for “Sam” the associated value would be 150 store at index 1 in our array in this case.&lt;/p&gt;
&lt;p&gt;Here’s the issue, to store a value into the backing array we’re using a hash function which for performance reasons generally doesn’t output a unique position to store a value within the array. This means there’s a possibility for two different keys to map to the same place in memory, known as a collision.&lt;/p&gt;
&lt;p&gt;We don’t want to overwrite existing data, and thus we have strategies for resolving collisions. In no particular order here’s the one’s we’ll go through:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Separate Chaining&lt;/li&gt;
&lt;li&gt;Linear Probing (Open Addressing)&lt;/li&gt;
&lt;li&gt;Coalesced Hashing&lt;/li&gt;
&lt;li&gt;Double Hashing&lt;/li&gt;
&lt;li&gt;Brent’s Method&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&quot;separate-chaining&quot;&gt;&lt;a href=&quot;#separate-chaining&quot;&gt;Separate Chaining&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Considered to be the simplest technique for resolving collisions, each slot in the array references a linked list (or other similar data structure) of records that collide on that slot. Each record stores its key and associated value.&lt;/p&gt;
&lt;p&gt;To insert into a hash table using chaining, call a hash function to get an index in which to store a given value in an array. Instead of directly inserting the value at that index, instead create a link between that index and a new node for a linked list.&lt;/p&gt;
&lt;p&gt;If we have multiple records under a single index in the array, each record points to the next one and we insert onto the last record in that position.&lt;/p&gt;
&lt;h1 id=&quot;linear-probing&quot;&gt;&lt;a href=&quot;#linear-probing&quot;&gt;Linear Probing&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Instead of storing colliding records under a separate data structure, open addressing instead stores directly on the array using a method known as probing.&lt;/p&gt;
&lt;p&gt;When inserting a new record that collides with a preexisting record in the array, probing searches for the next available empty spot in the array and inserts the value there.&lt;/p&gt;
&lt;p&gt;For example, given a slight modification of an earlier array like so:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;key&gt;,&lt;value&gt; or (Null)&lt;/value&gt;&lt;/key&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;key&gt;&lt;value&gt;┌────────────────────────────────────────────────────────────────┐&lt;/value&gt;&lt;/key&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;key&gt;&lt;value&gt;│Xavier, 202 | (Null) | (Null) | Sam, 150 | (Null) | Preston, 168│&lt;/value&gt;&lt;/key&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;key&gt;&lt;value&gt;└────────────────────────────────────────────────────────────────┘&lt;/value&gt;&lt;/key&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;key&gt;&lt;value&gt;       0         1         2        3          4          5&lt;/value&gt;&lt;/key&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Let’s say we want to insert a new person Jane with weight 120 and that our hash function informs us to insert at index 3. There’s an issue though, Sam already exists at index 3 and thus we cannot insert Jane into index 3. Thus we employ &lt;em&gt;linear probing&lt;/em&gt; to find the next empty location in the array. The next empty location in this case is index 4, and thus we insert “Jane, 120” at position 4 in the array.&lt;/p&gt;
&lt;p&gt;Our newly formed array will look something like this:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;key&gt;,&lt;value&gt; or (Null)&lt;/value&gt;&lt;/key&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;key&gt;&lt;value&gt;┌───────────────────────────────────────────────────────────────────┐&lt;/value&gt;&lt;/key&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;key&gt;&lt;value&gt;│Xavier, 202 | (Null) | (Null) | Sam, 150 | Jane, 120 | Preston, 168│&lt;/value&gt;&lt;/key&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;key&gt;&lt;value&gt;└───────────────────────────────────────────────────────────────────┘&lt;/value&gt;&lt;/key&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;key&gt;&lt;value&gt;       0         1         2        3           4            5&lt;/value&gt;&lt;/key&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note that we are not just storing the associated value with a key into the array, we are storing both the key and value (the full record) in the array. This is important for searching for a given value. Since our hash function may not return the true position of a record, we have to check the keys against the search key until we find the correct record. The improvement over a simple linear search across the entire array though, is that our hash function informs us the index a given record must be at or be after.&lt;/p&gt;
&lt;h1 id=&quot;coalesced-hashing&quot;&gt;&lt;a href=&quot;#coalesced-hashing&quot;&gt;Coalesced Hashing&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Coalesced Hashing combines Open Addressing with Separate Chaining.&lt;/p&gt;
&lt;p&gt;Where separate chaining will store colliding records in a separate data structure (linked lists), coalesced hashing will store the records directly in the array while linking the records together in something known as a collision chain.&lt;/p&gt;
&lt;p&gt;When inserting using coalesced hashing and we have a collision occur, we check if the record stored at the index points to another record and so and so forth until we reach the end of the links. Once we reach the end we linearly probe for the nearest open slot in the array and insert the new record into that position and add a link from the last record in the chain pointing to the newly inserted record.&lt;/p&gt;
&lt;p&gt;The reason one might want to use coalesced hashing over just a simple linear probe approach is that a linear probe could potentially go over unrelated or empty records until finding the record being searched. With a coalesced approach, one can instead follow the chain of links until either the record is found or the end of the chain is reached. This avoids going through unrelated records during a search.&lt;/p&gt;
&lt;h1 id=&quot;double-hashing&quot;&gt;&lt;a href=&quot;#double-hashing&quot;&gt;Double Hashing&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;To handle collision resolution, double hashing does what’s on the tin. It employs two hash functions to determine the position in the array for a record mixed with probing.&lt;/p&gt;
&lt;p&gt;During insertion, double hashing uses one hash value to index into an array and then repeatedly steps forward a set interval determined by a second hash function until an empty slot is found upon which its index is returned.&lt;/p&gt;
&lt;p&gt;By using a second hash function data ends up more uniformly spread across the underlying array of the hash table and results in a more probabilistic approach to determining indices.&lt;/p&gt;
&lt;h1 id=&quot;brents-method&quot;&gt;&lt;a href=&quot;#brents-method&quot;&gt;Brent’s Method&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Brent’s method is a way of minimizing the average time of searching the underlying array of a hash table. Brent’s method defines the hash function as: &lt;code&gt;hash(key) = key mod M&lt;/code&gt; and a incrementing function as &lt;code&gt;i(key) = Quotient(Key / M) mod M&lt;/code&gt; where &lt;code&gt;M&lt;/code&gt; refers to the size of the table.&lt;/p&gt;
&lt;p&gt;If a collision occurs during insertion, Brent’s method will then do a check if we should move the colliding record to reduce the number of probes made during searches. If the number of probes required to retrieve a item is 3 more then a preexisting record will be shifted no more than 3 indices over to reduce the number of probes required during a search.&lt;/p&gt;</content:encoded></item><item><title>Nitpicking a Data Structures and Algorithms Midterm Question</title><link>https://pricehiller.com/posts/nitpicking-a-data-structures-and-algorithms-midterm-question</link><guid isPermaLink="true">https://pricehiller.com/posts/nitpicking-a-data-structures-and-algorithms-midterm-question</guid><description>An anthill to die upon.</description><pubDate>Fri, 01 Mar 2024 00:00:00 GMT</pubDate><content:encoded>&lt;h1 id=&quot;context&quot;&gt;&lt;a href=&quot;#context&quot;&gt;Context&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;I’m currently enrolled at a university working towards a Computer Science degree. As part of my degree plan I have to
take a Data Structures and Algorithms (DSA) course.&lt;/p&gt;
&lt;p&gt;At the time of writing we had our midterm yesterday morning, and I missed marks on a question that I know for a fact had
no correct answer. This post is an analysis as to &lt;em&gt;why&lt;/em&gt; the question’s multiple choice answers were all incorrect.&lt;/p&gt;
&lt;p&gt;I’m writing this knowing I’m being a bit of a pedant and knowing that it’s &lt;em&gt;only&lt;/em&gt; a single question. But for whatever
reason this keeps circling around in my mind throwing around all the chairs and spray painting gang markers on the
walls. As such, I’m writing to get the poltergeist out.&lt;/p&gt;
&lt;h1 id=&quot;the-question&quot;&gt;&lt;a href=&quot;#the-question&quot;&gt;The Question&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Here’s roughly the question that was asked:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Given the following code:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-c&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-keyword-import&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&amp;#x3C;stdio.h&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-function&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-type-builtin&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;arr&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ts-number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ts-number&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;&amp;#x3C;&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;ts-operator&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;&amp;#x3C;&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ts-operator&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-function&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;arr[&lt;/span&gt;&lt;span class=&quot;ts-character&quot;&gt;%d&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;ts-character&quot;&gt;%d&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;] = &lt;/span&gt;&lt;span class=&quot;ts-character&quot;&gt;%d&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;, &quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;arr&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;What will the program do?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;a.)&lt;/strong&gt; There will be a warning&lt;br&gt;
&lt;strong&gt;b.)&lt;/strong&gt; Infinitely loop&lt;br&gt;
&lt;strong&gt;c.)&lt;/strong&gt; Output: &lt;code&gt;arr[0][0] = 1, arr[0][1] = 2, arr[1][0] = 3, arr[1][1] = 4, &lt;/code&gt;&lt;br&gt;
&lt;strong&gt;d.)&lt;/strong&gt; Output: &lt;code&gt;[0][-1] = 1, arr[0][-2] = 2, arr[1][-1] = 3, arr[1][-2] = 4, &lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I chose &lt;code&gt;a&lt;/code&gt;, after realizing that’s the &lt;em&gt;closest&lt;/em&gt; answer to being correct. Unfortunately this question is asking about
the most horrid thing on Earth and a large reason languages like Rust exist — &lt;strong&gt;undefined behavior&lt;/strong&gt; (UB)&lt;sup&gt;&lt;a href=&quot;#user-content-fn-1&quot; id=&quot;user-content-fnref-1&quot; data-footnote-ref=&quot;&quot; aria-describedby=&quot;footnote-label&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
&lt;p&gt;Answer &lt;code&gt;a&lt;/code&gt;, of course, is not correct. The exam had answer &lt;code&gt;b&lt;/code&gt; as correct, which is also wrong. In fact, none of the
above answers are correct.&lt;/p&gt;
&lt;h1 id=&quot;why-is-the-above-code-undefined-behavior-ub&quot;&gt;&lt;a href=&quot;#why-is-the-above-code-undefined-behavior-ub&quot;&gt;Why is the above code undefined behavior (UB)?&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The code given to us has an out-of-bounds array access. Take a look at the &lt;code&gt;for&lt;/code&gt; loops. The first &lt;code&gt;for&lt;/code&gt; loop is all
good, no problem there. The inner one, however, is our problem child.&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-c&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;arr&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ts-number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ts-number&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;&amp;#x3C;&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;ts-operator&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;&amp;#x3C;&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ts-operator&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;ts-comment&quot;&gt;// This line is bad!&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-comment&quot;&gt;// Eventually the sub-indexing of j will be out of bounds!&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-function&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;arr[&lt;/span&gt;&lt;span class=&quot;ts-character&quot;&gt;%d&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;ts-character&quot;&gt;%d&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;] = &lt;/span&gt;&lt;span class=&quot;ts-character&quot;&gt;%d&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;, &quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;arr&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The inner &lt;code&gt;for&lt;/code&gt; loop decrements the variable &lt;code&gt;j&lt;/code&gt; and will continue looping until &lt;code&gt;j&lt;/code&gt; is not less than 2 (so loop until
&lt;code&gt;j&lt;/code&gt; is more than or equal to 2). This means the array will eventually be indexed by whatever integer is stored into &lt;code&gt;j&lt;/code&gt;
and since &lt;code&gt;j&lt;/code&gt; is decremented from 0 it will be negative.&lt;/p&gt;
&lt;p&gt;As a result the array will be sub-indexed by a negative number, which is outside the bounds of the array. This is our
undefined behavior.&lt;/p&gt;
&lt;p&gt;Now that we’ve identified the issue with this problem let’s get into why none of the provided answers are correct.&lt;/p&gt;
&lt;h1 id=&quot;why-is-answer-a-wrong&quot;&gt;&lt;a href=&quot;#why-is-answer-a-wrong&quot;&gt;Why is answer &lt;code&gt;a&lt;/code&gt; wrong?&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;To save you some scrolling, answer &lt;code&gt;a&lt;/code&gt; was &lt;code&gt;There will be a warning&lt;/code&gt;. In this course, questions have been asked with
identical (or extremely close at least) answers like &lt;code&gt;a&lt;/code&gt; which were interested in compiler behavior.&lt;/p&gt;
&lt;p&gt;When I was marked wrong on this answer, I was actually quite surprised. Even more so when I recreated the identical code
and attempted to compile it with &lt;code&gt;gcc&lt;/code&gt; and got the following compilation &lt;em&gt;error&lt;/em&gt;:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;t.c: In function ‘main’:&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;t.c:7:13: error: iteration 1 invokes undefined behavior [-Werror=aggressive-loop-optimizations]&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    7 |             printf(&quot;arr[%d][%d] = %d, &quot;, i, j, arr[i][j]);&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;t.c:6:27: note: within this loop&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    6 |         for (int j = 0; j &amp;#x3C; 2; j--) {&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      |                         ~~^~~&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;cc1: all warnings being treated as errors&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It seemed apparent to me that the question had no right answers. Imagine my surprise then when the professor compiled
the same code in an online compiler and received neither an error or warning. That made me lose a bit of sanity and a
few hours later I realized the culprit, I have a &lt;em&gt;gat dang&lt;/em&gt; alias hiding out in my &lt;code&gt;zsh&lt;/code&gt; config ruining property values:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-function-builtin&quot;&gt;alias&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;gcc=&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;gcc -Werror -Wall -Wpedantic -Warray-bounds -O3&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I bring this up because I spent perhaps a few too many hours trying to figure out what the heck was going on. A simple
&lt;code&gt;command -v gcc&lt;/code&gt; would’ve found it &lt;em&gt;immediately&lt;/em&gt;, but I was too dumb to check that for quite some time 😞.&lt;/p&gt;
&lt;p&gt;I also bring it up because my problem with a difference in compiler settings being a problem &lt;em&gt;is&lt;/em&gt; a problem. By having
potential answers be about compiler behavior the question immediately invokes a &lt;em&gt;ton&lt;/em&gt; of implicit compiler configuration
and flags that were (to my knowledge) never clearly stated in my course. The problem then is no longer about DSA —
instead it’s about knowing the quirks of a compiler that may have differences on every single system and configurations
out there.&lt;/p&gt;
&lt;p&gt;Ok, but let’s just assume we’re rocking standard &lt;code&gt;gcc&lt;/code&gt; with no flags, and no configuration elsewhere. Thus, there
shouldn’t be any compiler warnings or errors. With that caveat in mind, answer &lt;code&gt;a&lt;/code&gt; can’t be right.&lt;/p&gt;
&lt;h1 id=&quot;why-are-answers-c--d-wrong&quot;&gt;&lt;a href=&quot;#why-are-answers-c--d-wrong&quot;&gt;Why are answers &lt;code&gt;c&lt;/code&gt; &amp;#x26; &lt;code&gt;d&lt;/code&gt; wrong?&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;I’m lumping these two together because they’re wrong for similar reasons and I figure I should cover all of my bases.&lt;/p&gt;
&lt;p&gt;Answers &lt;code&gt;c&lt;/code&gt; &amp;#x26; &lt;code&gt;d&lt;/code&gt; were:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;c.)&lt;/strong&gt; Output: &lt;code&gt;arr[0][0] = 1, arr[0][1] = 2, arr[1][0] = 3, arr[1][1] = 4, &lt;/code&gt;&lt;br&gt;
&lt;strong&gt;d.)&lt;/strong&gt; Output: &lt;code&gt;[0][-1] = 1, arr[0][-2] = 2, arr[1][-1] = 3, arr[1][-2] = 4, &lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;code&gt;c&lt;/code&gt; is wrong because the inner loop is being continuously decremented. In theory the sub-indexing integer &lt;code&gt;j&lt;/code&gt; should &lt;em&gt;never&lt;/em&gt; get a positive value. Purely &lt;em&gt;in theory&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;d&lt;/code&gt; is wrong because by indexing negatively into the array, the output values are incredibly unlikely to match the
actual values stored in the array; on top of that, indexing negatively into an array in C invokes UB, making this
necessarily wrong anyhow.&lt;/p&gt;
&lt;h1 id=&quot;why-is-the-supposedly-correct-answer-b-also-wrong&quot;&gt;&lt;a href=&quot;#why-is-the-supposedly-correct-answer-b-also-wrong&quot;&gt;Why is the supposedly correct answer, &lt;code&gt;b&lt;/code&gt;, also wrong?&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Answer &lt;code&gt;b&lt;/code&gt; stated that “&lt;strong&gt;the program will infinitely loop&lt;/strong&gt;”.&lt;/p&gt;
&lt;p&gt;I’ll paste the code again here for your reference so you don’t have to scroll back up to see it.&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-c&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-keyword-import&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&amp;#x3C;stdio.h&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-function&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-type-builtin&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;arr&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ts-number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ts-number&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;&amp;#x3C;&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;ts-operator&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;&amp;#x3C;&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ts-operator&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-function&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;arr[&lt;/span&gt;&lt;span class=&quot;ts-character&quot;&gt;%d&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;ts-character&quot;&gt;%d&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;] = &lt;/span&gt;&lt;span class=&quot;ts-character&quot;&gt;%d&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;, &quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;arr&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On the surface level it certainly seems this code would infinitely loop. Our inner loop integer &lt;code&gt;j&lt;/code&gt; is always being set
more and more negatively and it appears it will never be more than two. After all, subtracting one from a negative will
still leave you with a negative.&lt;/p&gt;
&lt;p&gt;There are two reasons that come to my mind at a glance why the above code actually won’t run until the Sun swallows the
Earth and time becomes meaningless.&lt;/p&gt;
&lt;h2 id=&quot;why-b-is-wrong-part-uno&quot;&gt;&lt;a href=&quot;#why-b-is-wrong-part-uno&quot;&gt;Why &lt;code&gt;b&lt;/code&gt; is Wrong, Part Uno&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The first reason that code won’t run infinitely is the realities of undefined behavior.&lt;/p&gt;
&lt;p&gt;On my laptop running Linux, kernel version 6.7.6 at the time of writing, the code above will have a segmentation fault
within the first few seconds of running. The Linux kernel actually has quite a few built-in security features and it
won’t let my code willy nilly access random addresses which sometimes happens with the negative indexing.&lt;/p&gt;
&lt;p&gt;Outside of the kernel security mechanisms, since we’re in UB land who’s to say what will actually happen as its
&lt;em&gt;undefined&lt;/em&gt;. So at best saying it runs forever is a guess — not actually something that can be proven easily.&lt;/p&gt;
&lt;h2 id=&quot;why-b-is-wrong-part-dos&quot;&gt;&lt;a href=&quot;#why-b-is-wrong-part-dos&quot;&gt;Why &lt;code&gt;b&lt;/code&gt; is Wrong, Part Dos&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The second reason is the much stronger of the two. Let’s, the for the sake of argument, say the above code never has a
segmentation fault. It will always be able to decrement &lt;code&gt;j&lt;/code&gt; and sub-index into the array.&lt;/p&gt;
&lt;p&gt;Even with these concessions, the program will still not run infinitely.&lt;/p&gt;
&lt;p&gt;To understand why, we have to dive into how integers work in C.&lt;/p&gt;
&lt;h3 id=&quot;isoiec-98992023-purgatory-oh-the-misery&quot;&gt;&lt;a href=&quot;#isoiec-98992023-purgatory-oh-the-misery&quot;&gt;ISO/IEC 9899:2023 Purgatory &lt;/a&gt;&lt;a href=&quot;https://youtu.be/vW23W0aDCjQ?t=32&quot;&gt;(Oh the misery)&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;So let’s go see what the actual published standard has to say on what an integer is. If we go on over to
&lt;a href=&quot;https://open-std.org&quot;&gt;open-std.org&lt;/a&gt; and go check out the latest published draft of “ISO/IEC 9899 - Revision of the C
standard” we end up with this &lt;a href=&quot;https://open-std.org/JTC1/SC22/WG14/www/docs/n3096.pdf&quot;&gt;big ol’ document&lt;/a&gt;. Crack ‘er open
and head down to page 41, section &lt;code&gt;6.2.6.2&lt;/code&gt; (fun to pronounce as “sixty-two sixty-two”).&lt;/p&gt;
&lt;p&gt;An integer, according to the standard, can be &lt;em&gt;signed&lt;/em&gt; or &lt;em&gt;unsigned&lt;/em&gt;. Since the integer we’re interested in, &lt;code&gt;j&lt;/code&gt;, is a
signed integer, let’s go through how a signed integer is standardized as in C.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;For signed integer types, the bits of the object representation shall be divided into three groups: value bits,
padding bits, and the sign bit. … the signed type uses the same number of &lt;em&gt;N&lt;/em&gt; bits as values bits and sign bit. &lt;em&gt;N -
1&lt;/em&gt; are value bits and the remaining bit is the sign bit. … If the sign bit is zero, it shall not affect the
resulting value. If the sign bit is one, it has value &lt;code&gt;-(2^(n-1))&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Note one more thing, the standard does &lt;em&gt;not&lt;/em&gt; define the actual size of an integer. That’s left to each implementation.
Since we’re using the &lt;code&gt;gcc&lt;/code&gt; compiler, let’s see what the &lt;a href=&quot;https://www.gnu.org/software/gnu-c-manual/gnu-c-manual.html#Integer-Types&quot;&gt;&lt;code&gt;gcc&lt;/code&gt; docs have to say on the size of a
integer&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The integer data types range in size from at least 8 bits to at least 32 bits. The C99 standard extends this range to
include integer sizes of at least 64 bits. You should use integer types for storing whole number values (and the char
data type for storing characters). The sizes and ranges listed for these types are minimums; depending on your
computer platform, these sizes and ranges may be larger.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Ah… that’s, uhhh, a pain — it’s gonna vary by architecture.&lt;/p&gt;
&lt;p&gt;On my system, integers get 32 bits when using &lt;code&gt;gcc&lt;/code&gt; and thus can represent &lt;code&gt;4,294,967,295&lt;/code&gt; distinct numbers. Remember,
the integer we’re working with is signed, thus half of those numbers will be negative. That means the largest and
smallest numbers my integers can be are &lt;code&gt;2,147,483,647&lt;/code&gt; and &lt;code&gt;-2,147,483,648&lt;/code&gt; respectively.&lt;/p&gt;
&lt;p&gt;Hmmm… what happens when we exceed either of those numbers? Let’s find out.&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-c&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-keyword-import&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&amp;#x3C;stdio.h&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-keyword-import&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&amp;#x3C;limits.h&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-keyword-import&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&amp;#x3C;stdlib.h&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-function&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-function&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;Starting number is: &lt;/span&gt;&lt;span class=&quot;ts-character&quot;&gt;%d&lt;/span&gt;&lt;span class=&quot;ts-string-escape&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-constant&quot;&gt;INT_MIN&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-function&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;New number is: &lt;/span&gt;&lt;span class=&quot;ts-character&quot;&gt;%d&lt;/span&gt;&lt;span class=&quot;ts-string-escape&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-constant&quot;&gt;INT_MIN&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-keyword-return&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;ts-constant&quot;&gt;EXIT_SUCCESS&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;INT_MIN&lt;/code&gt; in this case is the smallest integer representable.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;gcc&lt;/code&gt; warns about an “integer overflow”… interesting.&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;❯ gcc program.c&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;t.c: In function ‘main’:&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;t.c:8:43: warning: integer overflow in expression of type ‘int’ results in ‘2147483647’ [-Woverflow]&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    8 |     printf(&quot;New number is: %d\n&quot;, INT_MIN - 1);&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      |                                           ^&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Well let’s run it and see what the output is.&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;❯ ./a.out&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;Starting number is: -2147483648&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;New number is: 2147483647&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Oh, huh. Neat.&lt;/p&gt;
&lt;p&gt;So if we exceed the bounds the sign flips, literally an overflow or, in this case, an underflow.&lt;/p&gt;
&lt;h3 id=&quot;actually-for-real-this-time-why-b-is-wrong&quot;&gt;&lt;a href=&quot;#actually-for-real-this-time-why-b-is-wrong&quot;&gt;Actually for real this time why &lt;code&gt;b&lt;/code&gt; is wrong&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;With the overflow and underflow behavior now covered, let’s take a look back at the code given to me in class:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-c&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-keyword-import&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&amp;#x3C;stdio.h&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-function&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-type-builtin&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;arr&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ts-number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ts-number&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;&amp;#x3C;&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;ts-operator&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;&amp;#x3C;&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ts-operator&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-function&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;arr[&lt;/span&gt;&lt;span class=&quot;ts-character&quot;&gt;%d&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;ts-character&quot;&gt;%d&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;] = &lt;/span&gt;&lt;span class=&quot;ts-character&quot;&gt;%d&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;, &quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;arr&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now with everything we’ve covered let’s go point by point:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;So long as &lt;code&gt;j&lt;/code&gt; is less than 2 this will continue to run.&lt;/li&gt;
&lt;li&gt;Integer &lt;code&gt;j&lt;/code&gt; will be decremented for every execution of the inner loop.&lt;/li&gt;
&lt;li&gt;Integer types have a maximum capacity and if we exceed that capacity the sign changes.&lt;/li&gt;
&lt;li&gt;Eventually, &lt;code&gt;j&lt;/code&gt; will reach the smallest value an integer can represent and on the next loop it will underflow and
become a massively positive number.&lt;/li&gt;
&lt;li&gt;Integer &lt;code&gt;j&lt;/code&gt; will then eventually be more than 2 in value and thus the condition &lt;code&gt;j &amp;#x3C; 2&lt;/code&gt; will be invalidated and the loop
will end.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To prove the code won’t infinitely loop, let’s actually run the code with a few small modifications to speed things up:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-c&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-keyword-import&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&amp;#x3C;limits.h&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-keyword-import&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&amp;#x3C;stdio.h&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-function&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-type-builtin&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;arr&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ts-number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ts-number&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-comment&quot;&gt;// Move j&apos;s initializer up here so we can access it after the loop.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-comment&quot;&gt;// Also, set j to `INT_MIN` so our loop doesn&apos;t have to decrement&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-comment&quot;&gt;// 2147483648 times before the theorized underflow occurs which&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-comment&quot;&gt;// just cuts down on how long it takes to underflow.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-constant&quot;&gt;INT_MIN&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-type-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;&amp;#x3C;&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;ts-operator&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;&amp;#x3C;&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ts-operator&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-comment&quot;&gt;// Comment out the arr access to avoid seg faults&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-comment&quot;&gt;// printf(&quot;arr[%d][%d] = %d, &quot;, i, j, arr[i][j]);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;ts-function&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;J -&gt; &lt;/span&gt;&lt;span class=&quot;ts-character&quot;&gt;%d&lt;/span&gt;&lt;span class=&quot;ts-string-escape&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-comment&quot;&gt;// If the loop isn&apos;t infinite, we should see this message&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-function&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;THE LOOP WAS NOT INFINITE, J VALUE: &lt;/span&gt;&lt;span class=&quot;ts-character&quot;&gt;%d&lt;/span&gt;&lt;span class=&quot;ts-string-escape&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Running the above outputs:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;❯ gcc prog.c &amp;#x26;&amp;#x26; ./a.out&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;J -&gt; -2147483648&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;THE LOOP WAS NOT INFINITE, J VALUE: 2147483647&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Y u p. That’s underflow for sure.&lt;/p&gt;
&lt;p&gt;We can clearly see where &lt;code&gt;j&lt;/code&gt; was the smallest possible integer and then wrapped around to the largest possible integer
and in doing so caused the inner loop to end.&lt;/p&gt;
&lt;p&gt;Thus, answer &lt;code&gt;b&lt;/code&gt; is also wrong.&lt;/p&gt;
&lt;h1 id=&quot;a-quick-summary&quot;&gt;&lt;a href=&quot;#a-quick-summary&quot;&gt;A quick summary&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;As a result of all the above points, we can readily see that the potential answers we could pick from are all wrong.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;a.)&lt;/strong&gt; There will be a warning &lt;br&gt;
&lt;strong&gt;b.)&lt;/strong&gt; Infinitely loop &amp;#x3C;- An integer underflow will eventually occur causing the looping to end &lt;br&gt;
&lt;strong&gt;c.)&lt;/strong&gt; Output: &lt;code&gt;arr[0][0] = 1, arr[0][1] = 2, arr[1][0] = 3, arr[1][1] = 4, &lt;/code&gt; &lt;br&gt;
&lt;strong&gt;d.)&lt;/strong&gt; Output: &lt;code&gt;[0][-1] = 1, arr[0][-2] = 2, arr[1][-1] = 3, arr[1][-2] = 4, &lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;A quick summary of why each is wrong:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;a.)&lt;/strong&gt; We won’t get a warning unless we specify compiler flags/config for &lt;code&gt;gcc&lt;/code&gt;. &lt;br&gt;
&lt;strong&gt;b.)&lt;/strong&gt; An integer underflow will occur causing the looping to end and thus the program has a finite execution period,
and also the program will almost certainly have a segmentation fault causing the looping to end. &lt;br&gt;
&lt;strong&gt;c.)&lt;/strong&gt; &lt;code&gt;j&lt;/code&gt; will never sub-index into 1 or 2. &lt;br&gt;
&lt;strong&gt;d.)&lt;/strong&gt; Indexing &lt;code&gt;j&lt;/code&gt; negatively invokes undefined behavior, so we can’t know the output. As well as the fact that the
pattern for accessing the first index is wrong anyhow.&lt;/p&gt;
&lt;h1 id=&quot;is-my-pedantry--satisfied-now&quot;&gt;&lt;a href=&quot;#is-my-pedantry--satisfied-now&quot;&gt;Is My Pedantry (🤓) Satisfied Now?&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Somewhat, to be wholly honest I am still annoyed I got marked off on that question. At least now I can point somewhere
and say “See, look! I was right!” and then stick my fingers in my ears and cry in the corner.&lt;/p&gt;
&lt;p&gt;I actually skipped how integers &lt;em&gt;really&lt;/em&gt; work under the hood in terms of their binary representation. If you’re
interested, here’s the binary of the earlier underflow code example:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;Starting number is: -2147483648 | Binary: 10000000000000000000000000000000&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      New number is: 2147483647 | Binary: 01111111111111111111111111111111&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That opens up a whole ‘nother can of worms of &lt;em&gt;two’s complement&lt;/em&gt; and actually how the bits are stored and manipulated.
A deeper look at why the underflow behavior occurs through how integers are added at the binary level can also be used
to disprove answer &lt;code&gt;b&lt;/code&gt;. I cut a full break down of this out, because I realized it was somewhat irrelevant. The quick
integer whole number example makes the same point without nearly as much technicality.&lt;/p&gt;
&lt;p&gt;The main takeaway: anytime you end up in undefined behavior land with C things get wacky real quick and all numeric
types are actually black magic pretending to be approachable.&lt;/p&gt;
&lt;section data-footnotes=&quot;&quot; class=&quot;footnotes&quot;&gt;&lt;h2 class=&quot;sr-only&quot; id=&quot;footnote-label&quot;&gt;&lt;a href=&quot;#footnote-label&quot;&gt;Footnotes&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li id=&quot;user-content-fn-1&quot;&gt;
&lt;p&gt;If you don’t know what undefined behavior is, Wikipedia has an article on it &lt;a href=&quot;https://en.wikipedia.org/wiki/Undefined_behavior&quot;&gt;here&lt;/a&gt;. &lt;a href=&quot;#user-content-fnref-1&quot; data-footnote-backref=&quot;&quot; aria-label=&quot;Back to reference 1&quot; class=&quot;data-footnote-backref&quot;&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;</content:encoded></item><item><title>Setting up NixOS on my Home Server</title><link>https://pricehiller.com/posts/setting-up-nixos-on-my-home-server</link><guid isPermaLink="true">https://pricehiller.com/posts/setting-up-nixos-on-my-home-server</guid><description>Using NixOS flakes to configure my home server.</description><pubDate>Sun, 29 Oct 2023 00:00:00 GMT</pubDate><content:encoded>&lt;h1 id=&quot;what-does-this-article-cover&quot;&gt;&lt;a href=&quot;#what-does-this-article-cover&quot;&gt;What does this article cover?&lt;/a&gt;&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Why I chose NixOS&lt;/li&gt;
&lt;li&gt;Installing NixOS from the minimal installer.&lt;/li&gt;
&lt;li&gt;Using &lt;a href=&quot;https://nixos.wiki/wiki/Flakes#&quot;&gt;Flakes&lt;/a&gt; to configure the system&lt;/li&gt;
&lt;li&gt;An &lt;a href=&quot;https://grahamc.com/blog/erase-your-darlings/&quot;&gt;Erase Your Darling’s Setup on tmpfs&lt;/a&gt; which wipes the system on
every reboot. This seems crazy, but with NixOS this is &lt;em&gt;incredibly&lt;/em&gt; powerful.&lt;/li&gt;
&lt;li&gt;Self hosted &lt;a href=&quot;https://about.gitlab.com/install/&quot;&gt;Gitlab&lt;/a&gt; with a &lt;a href=&quot;https://docs.gitlab.com/runner/&quot;&gt;Gitlab Runner&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Secrets management with Agenix&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is &lt;em&gt;not&lt;/em&gt; a general NixOS tutorial, I’m assuming you have some level of familiarity with what a Nix Flake is and
what NixOS is. I strongly recommend against using this article as a how to for NixOS. This is not that. This is more my
musings and interesting tidbits I came upon whilst messing about with NixOS and a small bit of a guide to those who may
need Gitlab on NixOS.&lt;/p&gt;
&lt;h1 id=&quot;why-i-chose-nixos&quot;&gt;&lt;a href=&quot;#why-i-chose-nixos&quot;&gt;Why I Chose NixOS&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;If you don’t care, you can skip to the next section &lt;a href=&quot;#installing-nixos&quot;&gt;here&lt;/a&gt;. I do a minuscule amount of
ranting as to my reasoning, as you can probably guess.&lt;/p&gt;
&lt;p&gt;My background in managing systems is via &lt;a href=&quot;https://github.com/ansible/ansible&quot;&gt;Ansible&lt;/a&gt; and that’s how I’ll be
approaching the why.&lt;/p&gt;
&lt;p&gt;One setup that you can do with NixOS is an “&lt;a href=&quot;https://grahamc.com/blog/erase-your-darlings/&quot;&gt;Erase Your Darling’s&lt;/a&gt;”
configuration. Using BTRFS, ZFS, or another file system with snapshot support, one can rollback the system on every
reboot to the last snapshot or mount the system on
&lt;a href=&quot;https://www.kernel.org/doc/html/latest/filesystems/tmpfs.html&quot;&gt;tmpfs&lt;/a&gt; and wipe it on reboot. By doing this we can have
NixOS declaratively set the system state such that anything outside of the config that hasn’t been explicitly set to
persist on reboot gets wiped. This ensures the NixOS configuration is &lt;em&gt;the&lt;/em&gt; source of truth.&lt;/p&gt;
&lt;p&gt;A criticism I have of Ansible is that it actively requires users to practice good check in control with it. Meaning they
have to remember or create a procedure to ensure all configuration ends up in Ansible. Not too hard if it’s a one person
show, but becomes increasingly bothersome as more and more individuals need to contribute. In effect, this causes little
“hacks” accumulate on the system outside of version control by accident. Procedures to check-in everything into VCS only
solves this so much. My preference is to ensure the systems force us to take the correct action by default instead of
those actions being opt-in.&lt;/p&gt;
&lt;p&gt;Even in the scenario in which you are &lt;em&gt;perfect&lt;/em&gt; about getting everything into VCS, Ansible still falls short. Ansible
doesn’t necessarily define what is on a system and how it’s configured, it defines how we’d &lt;em&gt;like&lt;/em&gt; a system to be
configured via a declarative set of (ideally) idempotent steps. These steps may fail, and, furthermore, there is nothing
at the system level enforcing the entering of these steps into Ansible. NixOS enforces this completely.&lt;/p&gt;
&lt;p&gt;This all comes from a, perhaps extreme, ideology of mine that pretty much everyone will take the path of least
resistance when working on something for a longer period of time. They may commit to “Yeah, of course keep everything in
VCS” and some may be able to keep to that — most won’t. Understanding this then, we must enforce below the human level
the desired outcomes of systems engineering we want. We want everything checked into VCS? Great, ensure everything &lt;em&gt;not&lt;/em&gt;
checked in is wiped, all that work lost. Everyone will become comfy real fast with checking changes in under such a
system.&lt;/p&gt;
&lt;p&gt;Another hill I am 99% willing to die on is ensuring that a server, or for that matter, any system should be able to
reproduced with minimal or no human interaction. My server went down in Chicago? No problem, I have that configuration
in VCS, I’ll just put it on one in New York.&lt;/p&gt;
&lt;p&gt;I believe these two elements lead to high velocity and more resilient infrastructure over time and are worth the upfront
investment to achieve as the dividends are huge.&lt;/p&gt;
&lt;p&gt;Ideology and other ranting done. Let’s get into it and thanks for reading that lore dump if you actually did 😉.&lt;/p&gt;
&lt;h1 id=&quot;installing-nixos&quot;&gt;&lt;a href=&quot;#installing-nixos&quot;&gt;Installing NixOS&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;A quick preface as to how I chose to setup my system. I’m rolling with an “&lt;a href=&quot;https://grahamc.com/blog/erase-your-darlings/&quot;&gt;Erase Your Darling’s Setup on
tmpfs&lt;/a&gt;” such that my system is wiped on every boot with the goal of
keeping the system consistent with what I define in my Nix configs.&lt;/p&gt;
&lt;p&gt;I wrote a install script to set all of this up for me, using BTRFS mostly for reasons of compression more than
snapshots. I’ll have to reconsider BTRFS in the future. For now though, I’m using it.&lt;/p&gt;
&lt;p&gt;As part of this install I do one thing that I’ve noticed most NixOS configurations are not doing, that being taking full
advantage of setting disk labels. Many configurations I’ve referenced run &lt;code&gt;nixos-generate-config&lt;/code&gt; and call it a day
after checking that into version control. That works fine, but I far prefer being able to define my &lt;code&gt;filesystem.nix&lt;/code&gt;
ahead of time. As such, disk labels.&lt;/p&gt;
&lt;p&gt;For instance,
&lt;a href=&quot;https://gitlab.orion-technologies.io/philler/nixos/-/blob/Development/hosts/luna/os/filesystem.nix?ref_type=heads&quot;&gt;Luna&lt;/a&gt;,
my home server, has its file system set ahead of time like so:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-nix&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;config&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;lib&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;pkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;modulesPath&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter-builtin&quot;&gt;...&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;fileSystems&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;device&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;none&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;fsType&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;tmpfs&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;options&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;defaults&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;noatime&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;mode=755&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/boot&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;device&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/dev/disk/by-label/NixOS-Boot&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;fsType&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;vfat&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;options&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;defaults&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;noatime&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;depends&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/nix&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;device&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/dev/disk/by-label/NixOS-Primary&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;fsType&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;btrfs&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;options&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;subvol=@nix&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;compress=zstd&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;noatime&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;zramSwap&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;enable&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Those disk labels, &lt;code&gt;NixOS-Boot&lt;/code&gt; and &lt;code&gt;NixOS-Primary&lt;/code&gt;, are set by my install script. Since I use the same script to
install NixOS everywhere I know ahead of time what labels to target. Magic.&lt;/p&gt;
&lt;p&gt;Then I install NixOS after having defined a configuration with my &lt;a href=&quot;https://gitlab.orion-technologies.io/philler/nixos/-/blob/Development/install.bash?ref_type=heads&quot;&gt;install script&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So a typical setup would look something like this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Define the system ahead of time in my &lt;a href=&quot;https://gitlab.orion-technologies.io/philler/nixos/-/tree/Development/hosts?ref_type=heads&quot;&gt;&lt;code&gt;hosts/&lt;/code&gt; directory&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Install NixOS onto a flash drive (or into &lt;a href=&quot;https://www.ventoy.net/en/index.html&quot;&gt;Ventory&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Start up the system using that minimal boot drive&lt;/li&gt;
&lt;li&gt;Git clone my &lt;a href=&quot;https://gitlab.orion-technologies.io/philler/nixos.git&quot;&gt;NixOS configuration&lt;/a&gt;, &lt;code&gt;git clone https://gitlab.orion-technologies.io/philler/nixos.git &amp;#x26;&amp;#x26; cd nixos&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Identify the disk I’m going to install to via &lt;code&gt;lsblk&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Run my install script: &lt;code&gt;bash install.bash -d &amp;#x3C;DISK_HERE&gt; -H &amp;#x3C;NEW-HOST&gt;&lt;/code&gt; (optionally passing &lt;code&gt;-e&lt;/code&gt; to enable encryption)&lt;/li&gt;
&lt;li&gt;Wait for it to be done. Potentially cry when something goes wrong with the install.&lt;/li&gt;
&lt;li&gt;Reboot
&lt;picture&gt; &lt;source srcset=&quot;/assets/static/mission-accomplished-Cdl8HFZpROhUfZWT3Z7H_Z7oXVA.avif 370w&quot; type=&quot;image/avif&quot;&gt;&lt;source srcset=&quot;/assets/static/mission-accomplished-Cdl8HFZpROhUfZWT3Z7H_1h2ugV.webp 370w&quot; type=&quot;image/webp&quot;&gt;&lt;source srcset=&quot;/assets/static/mission-accomplished-Cdl8HFZpROhUfZWT3Z7H_19YQlQ.jpeg 370w&quot; type=&quot;image/jpeg&quot;&gt;&lt;source srcset=&quot;/assets/static/mission-accomplished-Cdl8HFZpROhUfZWT3Z7H_Z99xY3.png 370w&quot; type=&quot;image/png&quot;&gt;  &lt;img src=&quot;https://pricehiller.com/assets/static/mission-accomplished-Cdl8HFZpROhUfZWT3Z7H_Z99xY3.png&quot; srcset=&quot;/assets/static/mission-accomplished-Cdl8HFZpROhUfZWT3Z7H_Z99xY3.png 370w&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; alt=&quot;Mission Accomplished&quot; sizes=&quot;(min-width: 370px) 370px, 100vw&quot; data-astro-image=&quot;constrained&quot; data-astro-image-fit=&quot;cover&quot; data-astro-image-pos=&quot;center&quot; width=&quot;370&quot; height=&quot;278&quot;&gt; &lt;/picture&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h1 id=&quot;so-where-does-erase-your-darlings-come-in&quot;&gt;&lt;a href=&quot;#so-where-does-erase-your-darlings-come-in&quot;&gt;So where does Erase Your Darling’s come in?&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Right. So, the install script does a fair bit of heavy lifting, you may have noticed up in the &lt;code&gt;filesystem.nix&lt;/code&gt; I pasted
up there that I had the root path, &lt;code&gt;/&lt;/code&gt;, as an &lt;code&gt;fsType&lt;/code&gt; of &lt;code&gt;tmpfs&lt;/code&gt;. This is my erasure method. I then use
&lt;a href=&quot;https://github.com/nix-community/impermanence&quot;&gt;Impermanence&lt;/a&gt; to declare which directories shouldn’t be nuked on reboot.
Those get saved into &lt;code&gt;/nix/persist/&lt;/code&gt; and then symlinked back out on every reboot. I declare my default Impermanence
setup like so:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-nix&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-variable&quot;&gt;environment&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-function&quot;&gt;persistence&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/nix/persist&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;hideMounts&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;directories&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/var/lib&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/var/log&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/etc/nixos&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/opt&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/persist&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;files&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/etc/machine-id&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/etc/nix/id_rsa&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So now, with that defined in my flakes, I get all of those defined directories and files persisted on reboot by default.
For each host I can then further define more directories to persist in the host-specific config.&lt;/p&gt;
&lt;p&gt;Not too much to it, but quite powerful.&lt;/p&gt;
&lt;h1 id=&quot;gitlab-dollar-tree-github&quot;&gt;&lt;a href=&quot;#gitlab-dollar-tree-github&quot;&gt;Gitlab, Dollar Tree Github&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;I’m sure this heading won’t be incendiary or anything.&lt;/p&gt;
&lt;p&gt;At the time of writing, I self-host &lt;a href=&quot;https://about.gitlab.com/&quot;&gt;Gitlab&lt;/a&gt; to store all of my code and run CI/CD
operations. Originally I handled this all in Ansible and a bit of spit shine on &lt;a href=&quot;https://www.debian.org/&quot;&gt;Debian&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now NixOS is &lt;em&gt;really&lt;/em&gt; cool, it provides a &lt;a href=&quot;https://search.nixos.org/options?channel=23.05&amp;#x26;from=0&amp;#x26;size=50&amp;#x26;sort=relevance&amp;#x26;type=packages&amp;#x26;query=services.gitlab&quot;&gt;built-in Gitlab service&lt;/a&gt;! Which I don’t use… yeah. The Gitlab service NixOS provides is a touch out of date and because Gitlab is the worst platform on the face of the planet of Earth when it comes to administration you can’t restore a backup on even slightly different versions of Gitlab. So the built-in module is right out 😦.&lt;/p&gt;
&lt;p&gt;I’m not screwed, there’s another solution. Gitlab provides a &lt;a href=&quot;https://docs.gitlab.com/ee/install/docker.html&quot;&gt;docker
image&lt;/a&gt;. That’s what I ultimately went with.&lt;/p&gt;
&lt;p&gt;I have a &lt;code&gt;docker&lt;/code&gt; directory nestled within Luna’s config with a &lt;code&gt;default.nix&lt;/code&gt; file that looks like so:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-nix&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;pkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter-builtin&quot;&gt;...&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;environment&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;systemPackages&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt;  &lt;span class=&quot;ts-keyword&quot;&gt;with&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;pkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable&quot;&gt;docker_24&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable&quot;&gt;docker-compose&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;virtualisation&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;oci-containers&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;backend&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;docker&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;containers&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;enable&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;docker&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;enable&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;autoPrune&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;enable&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;package&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;pkgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;docker_24&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;imports&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-string-special&quot;&gt;./gitlab.nix&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I don’t &lt;em&gt;really&lt;/em&gt; need docker-compose, but I’m saving myself trouble ahead of time and just shoving it on the system.
Increased attack surface? Yeah, a bit. Actually a likely issue? Nope, and it’s damn useful.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;gitlab.nix&lt;/code&gt; file its importing looks like:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-nix&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;lib&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;config&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;specialArgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter-builtin&quot;&gt;...&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-keyword&quot;&gt;let&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  gitlab_home &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/opt/gitlab&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  hostname &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;gitlab.orion-technologies.io&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-keyword&quot;&gt;in&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;virtualisation&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;oci-containers&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;containers&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;gitlab&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;image&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;gitlab/gitlab-ee:latest&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;autoStart&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;ports&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;127.0.0.1:8080:80&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;2222:22&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;volumes&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;gitlab_home&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/config:/etc/gitlab&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;gitlab_home&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/logs:/var/log/gitlab&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;gitlab_home&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/data:/var/opt/gitlab&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;extraOptions&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;--shm-size=256m&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;--hostname=&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;hostname&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;networking&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;firewall&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;allowedTCPPorts&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-number&quot;&gt;2222&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;age&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;secrets&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;gitlab-runner-reg-config&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;specialArgs&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;secrets&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/gitlab-runner-reg-config.age&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;services&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;gitlab-runner&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;enable&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;services&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;default&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-keyword&quot;&gt;with&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;lib&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;registrationConfigFile&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;config&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;age&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;secrets&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;gitlab-runner-reg-config&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;dockerImage&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;alpine&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable-member&quot;&gt;tagList&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;alpine&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;          &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;services&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;nginx&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;virtualHosts&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;hostname&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;locations&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;proxyPass&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;http://127.0.0.1:8080&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;forceSSL&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;enableACME&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I’ll break it down real quick for those poor basta— folks who end up deciding to put Gitlab on NixOS and have the same
issues as me.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Part uno, the actual Gitlab instance on Docker.&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-nix&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-variable&quot;&gt;virtualisation&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;oci-containers&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;containers&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-function&quot;&gt;gitlab&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;image&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;gitlab/gitlab-ee:latest&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;autoStart&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;ports&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;127.0.0.1:8080:80&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;2222:22&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;volumes&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;gitlab_home&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/config:/etc/gitlab&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;gitlab_home&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/logs:/var/log/gitlab&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;gitlab_home&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/data:/var/opt/gitlab&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;extraOptions&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;--shm-size=256m&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;--hostname=&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;hostname&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is almost verbatim copied over from Gitlab’s docs, the only thing of note here is the volume mount path. That
variable &lt;code&gt;gitlab_home&lt;/code&gt; was defined earlier as &lt;code&gt;/opt&lt;/code&gt;. I persist that directory between reboots, so we’re good to store
stuff there.&lt;/p&gt;
&lt;p&gt;Make sure you’ve allowed port &lt;code&gt;2222&lt;/code&gt; on the firewall:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-nix&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-variable&quot;&gt;networking&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;firewall&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-function&quot;&gt;allowedTCPPorts&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;2222&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you forget to do so, you won’t be able to use SSH keys on some git operations.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Part dos, the reverse proxy.&lt;/p&gt;
&lt;p&gt;I like SSL, I hope you do too. Instead of allowing Gitlab to manage its own proxy, I prefer having a single proxy on the
host that handles all of that for the various containers that may be running.&lt;/p&gt;
&lt;p&gt;I have a primary &lt;code&gt;nginx.nix&lt;/code&gt; service file that contains the following:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-nix&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;config&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter-builtin&quot;&gt;...&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;services&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;nginx&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;enable&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;recommendedProxySettings&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;recommendedOptimisation&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;recommendedGzipSettings&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;recommendedTlsSettings&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;security&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;acme&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;acceptTerms&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;defaults&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;email&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;price@orion-technologies.io&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A bit of basic setup for all the services and ensuring &lt;a href=&quot;https://datatracker.ietf.org/doc/html/rfc8555&quot;&gt;ACME&lt;/a&gt; (by the
way the ACME RFC is actually insanely well written, give it a read if you have time to kill) plays nice.&lt;/p&gt;
&lt;p&gt;And then all I have to define is the specifics for a given virtual host.&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-nix&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-variable&quot;&gt;services&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;nginx&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;virtualHosts&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;ts-variable&quot;&gt;hostname&lt;/span&gt;&lt;span class=&quot;ts-punctuation-special&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;locations&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;proxyPass&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;http://127.0.0.1:8080&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;forceSSL&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;enableACME&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In the config above the &lt;code&gt;hostname&lt;/code&gt; variable is my Gitlab A record: &lt;code&gt;gitlab.orion-technologies.io&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;That’s the nix side of things, we have a bit more to do on the Gitlab side of things. Which I am sad to say took me more
than just a few minutes to figure out because I didn’t reference the docs, &lt;strong&gt;RTFM&lt;/strong&gt;. Gitlab-wise we need to set the
following in our &lt;code&gt;gitlab.rb&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-ruby&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-function&quot;&gt;external_url&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;https://gitlab.orion-technologies.io&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-variable&quot;&gt;nginx&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;listen_port&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;80&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-variable&quot;&gt;nginx&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;listen_https&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-variable&quot;&gt;gitlab_rails&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;gitlab_shell_ssh_port&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-number&quot;&gt;2222&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Of course replace the external URL with yours. We disable HTTPS in the Nginx config because we are managing that on the
host with our own reverse proxy. Bind it on to port 80 which we pass out to the host accessible at &lt;code&gt;8080&lt;/code&gt; to the docker
container. The one setting that wasted the most time of mine was &lt;code&gt;gitlab_shell_ssh_port&lt;/code&gt; by a mile. Why did it not work?
Maybe I had the port closed on the network firewall, the world may never know. Real quick though, make sure you set
&lt;code&gt;gitlab_shell_ssh_port&lt;/code&gt; to the &lt;em&gt;external&lt;/em&gt; port that you’re opening on the host, not the internal.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Part tres, the Gitlab runner&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-nix&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-variable&quot;&gt;services&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-function&quot;&gt;gitlab-runner&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;enable&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;services&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;default&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-keyword&quot;&gt;with&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;lib&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;registrationConfigFile&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-function-builtin&quot;&gt;toString&lt;/span&gt; &lt;span class=&quot;ts-string-special&quot;&gt;./path/to/runner/config&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;dockerImage&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;alpine&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;tagList&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;alpine&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You may have noticed I slightly changed the assignment for the &lt;code&gt;registrationConfigFile&lt;/code&gt;. We’ll talk about secrets
management in a sec. For the general use, if you don’t want to handle secrets in your NixOS configuration, just set that
path to something like &lt;code&gt;/opt/gitlab/gitlab-runner-config&lt;/code&gt; and store the config there. You’ll need to get a runner token
from the Admin area which is located in the middle of nowhere. If you forgot how to get to the &lt;em&gt;stuck in Utah Admin
panel button&lt;/em&gt; I’ve gotchu. Go to your Gitlab instance’ home page, on the top left there is “Search or go to…”, click
that and then click “Admin Area” in the modal that pops up. They couldn’t have hidden that better if they tried, I
swear.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt; &lt;source srcset=&quot;/assets/static/gitlab-admin-area-BZ_8Nzs0mcemltD4X2WK_Z1i1J4d.webp 640w, /assets/static/gitlab-admin-area-BZ_8Nzs0mcemltD4X2WK_uFeJG.webp 750w, /assets/static/gitlab-admin-area-BZ_8Nzs0mcemltD4X2WK_Z2heb5Y.webp 828w, /assets/static/gitlab-admin-area-BZ_8Nzs0mcemltD4X2WK_Z25o1qt.webp 1080w, /assets/static/gitlab-admin-area-BZ_8Nzs0mcemltD4X2WK_7flBT.webp 1230w&quot; type=&quot;image/webp&quot;&gt;&lt;source srcset=&quot;/assets/static/gitlab-admin-area-BZ_8Nzs0mcemltD4X2WK_2b1qoo.gif 640w, /assets/static/gitlab-admin-area-BZ_8Nzs0mcemltD4X2WK_Z16sIAD.gif 750w, /assets/static/gitlab-admin-area-BZ_8Nzs0mcemltD4X2WK_1bNYmC.gif 828w, /assets/static/gitlab-admin-area-BZ_8Nzs0mcemltD4X2WK_Z16WJ5i.gif 1080w, /assets/static/gitlab-admin-area-BZ_8Nzs0mcemltD4X2WK_15FCX5.gif 1230w&quot; type=&quot;image/gif&quot;&gt;  &lt;img src=&quot;https://pricehiller.com/assets/static/gitlab-admin-area-BZ_8Nzs0mcemltD4X2WK_15FCX5.gif&quot; srcset=&quot;/assets/static/gitlab-admin-area-BZ_8Nzs0mcemltD4X2WK_2b1qoo.gif 640w, /assets/static/gitlab-admin-area-BZ_8Nzs0mcemltD4X2WK_Z16sIAD.gif 750w, /assets/static/gitlab-admin-area-BZ_8Nzs0mcemltD4X2WK_1bNYmC.gif 828w, /assets/static/gitlab-admin-area-BZ_8Nzs0mcemltD4X2WK_Z16WJ5i.gif 1080w, /assets/static/gitlab-admin-area-BZ_8Nzs0mcemltD4X2WK_15FCX5.gif 1230w&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; alt=&quot;Getting to the Admin Area in Gitlab&quot; sizes=&quot;(min-width: 1230px) 1230px, 100vw&quot; data-astro-image=&quot;constrained&quot; data-astro-image-fit=&quot;cover&quot; data-astro-image-pos=&quot;center&quot; width=&quot;1230&quot; height=&quot;552&quot;&gt; &lt;/picture&gt;
From here head to “CI/CD” &gt; “Runners” and in the top right you should see a nice shiny “New Instance Runner” button:
&lt;picture&gt; &lt;source srcset=&quot;/assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_1MD0F5.avif 640w, /assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_Z1aS4nV.avif 750w, /assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_Z2bMYNr.avif 828w, /assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_Z1PXxoD.avif 1080w, /assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_2kbpPr.avif 1177w&quot; type=&quot;image/avif&quot;&gt;&lt;source srcset=&quot;/assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_Z1S6DUk.webp 640w, /assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_dyoOA.webp 750w, /assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_ZMlvzU.webp 828w, /assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_So8U9.webp 1080w, /assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_ZD1DH.webp 1177w&quot; type=&quot;image/webp&quot;&gt;&lt;source srcset=&quot;/assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_Z209hPp.jpeg 640w, /assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_6vKTv.jpeg 750w, /assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_ZTo9v0.jpeg 828w, /assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_2ofvex.jpeg 1080w, /assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_1udkEG.jpeg 1177w&quot; type=&quot;image/jpeg&quot;&gt;&lt;source srcset=&quot;/assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_1KSqCC.png 640w, /assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_Z1cCDqo.png 750w, /assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_Z2dxyPT.png 828w, /assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_2l3Ma4.png 1080w, /assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_1r1BAd.png 1177w&quot; type=&quot;image/png&quot;&gt;  &lt;img src=&quot;https://pricehiller.com/assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_1r1BAd.png&quot; srcset=&quot;/assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_1KSqCC.png 640w, /assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_Z1cCDqo.png 750w, /assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_Z2dxyPT.png 828w, /assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_2l3Ma4.png 1080w, /assets/static/gitlab-runners-page-UPEKlzIjln6axcHZTKtX_1r1BAd.png 1177w&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; alt=&quot;Gitlab Runners Page&quot; sizes=&quot;(min-width: 1177px) 1177px, 100vw&quot; data-astro-image=&quot;constrained&quot; data-astro-image-fit=&quot;cover&quot; data-astro-image-pos=&quot;center&quot; width=&quot;1177&quot; height=&quot;286&quot;&gt; &lt;/picture&gt;
Now fill those details out for your runner and hit “Create Runner” at the bottom. Do not close the page, we’re going to
need the &lt;code&gt;url&lt;/code&gt; and &lt;code&gt;token&lt;/code&gt; from it.&lt;/p&gt;
&lt;p&gt;Now remember the &lt;code&gt;registrationConfigFile&lt;/code&gt; option mentioned earlier? This is when that becomes relevant. Create a file at
the &lt;code&gt;registrationConfigFile&lt;/code&gt; path on the NixOS system and place the following into it:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;CI_SERVER_URL=&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;url-here&gt;REGISTRATION_TOKEN=&lt;/url-here&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So for me it would look something like:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;CI_SERVER_URL=https://gitlab.orion-technologies.io&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;REGISTRATION_TOKEN=wdjD-dwa23AsdahSAli-ALWO&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;At this point when we run &lt;code&gt;nixos-rebuild switch&lt;/code&gt; everything should be fine and dandy.&lt;/p&gt;
&lt;p&gt;This is really cool, but if we want to go a step further we can actually manage this file along with our NixOS
configuration by encrypting it. If that seems a bit too iffy feel free to stop now. If you think that sounds neat,
managing secrets in NixOS, then onwards into the light!&lt;/p&gt;
&lt;h1 id=&quot;agenix-wheres-my-damn-yubikey-plugin-support&quot;&gt;&lt;a href=&quot;#agenix-wheres-my-damn-yubikey-plugin-support&quot;&gt;Agenix, where’s my damn Yubikey plugin support?!&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;There’s many ways to manage secrets in Nix the main ones are &lt;a href=&quot;https://github.com/ryantm/agenix&quot;&gt;agenix&lt;/a&gt; and
&lt;a href=&quot;https://github.com/Mic92/sops-nix&quot;&gt;sops-nix&lt;/a&gt;. I ultimately settled on Agenix over sops-nix because &lt;a href=&quot;https://github.com/ryantm/agenix/pull/186&quot;&gt;Yubikey is close to
native support with Agenix&lt;/a&gt; and I have a Yubikey. The header of this section
isn’t that serious, and perhaps I’ll get annoyed enough to shepherd something to the finish line.&lt;/p&gt;
&lt;p&gt;Age is self described as “…a simple, modern and secure file encryption tool, format…”. I treat it basically as PGP
if it was sane.&lt;/p&gt;
&lt;p&gt;If you have a Yubikey I recommend storing a master encryption key using
&lt;a href=&quot;https://github.com/str4d/age-plugin-yubikey&quot;&gt;age-plugin-yubikey&lt;/a&gt; which massively improves storing age keys in the PIV
store&lt;/p&gt;
&lt;p&gt;The way I use this is shove a single master key in my Yubikey, then generate an age key for each host. So Luna, for
instance, has its own age key stored in an encrypted external drive. When I go to install Luna I decrypt the key and
copy it over to the server to a path where Nix will look for it when I do a rebuild. I keep a master key on my Yubikey
so in the scenario in which my external drive explodes into a million shards I still have a way of accessing the
encrypted information and vice versa. The yubikey dies? I look at the external drive. Is it perfectly redundant? No. But
for my needs it’s good enough. You can take this as far as you’d like.&lt;/p&gt;
&lt;p&gt;First things first to actually using this then. Get agenix installed and ready to roll and I recommend also installing
&lt;a href=&quot;https://github.com/FiloSottile/age&quot;&gt;age&lt;/a&gt; or &lt;a href=&quot;https://github.com/str4d/rage&quot;&gt;rage&lt;/a&gt; the encryption tool agenix wraps.&lt;/p&gt;
&lt;p&gt;Agenix prefers you to use SSH keys, I’m not doing that. I’m purely using age keys with SSH left untouched. Go ahead and
create your age key for your host &lt;code&gt;age-keygen -o host.key&lt;/code&gt; and make sure you save it somewhere secure.&lt;/p&gt;
&lt;p&gt;In the nix flake, at the top level, create a &lt;code&gt;secrets&lt;/code&gt; directory and in it create a &lt;code&gt;secrets.nix&lt;/code&gt; file.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;secrets.nix&lt;/code&gt; file is used purely by agenix to encrypt and modify secrets. Within it we’ll define the recipients,
the public keys that can encrypt the secrets where the age private key we generated can decrypt them. Get the public key
from your generated age key and let’s modify the &lt;code&gt;secrets.nix&lt;/code&gt; file.&lt;/p&gt;
&lt;p&gt;Here is my &lt;code&gt;secrets.nix&lt;/code&gt; file:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-nix&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-keyword&quot;&gt;let&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  keys &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-keyword&quot;&gt;rec&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;master&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;age1yubikey1qfnj0k4mkzrn8ef5llwh2sv6hd7ckr0qml3n9hzdpz9c59ypvryhyst87k0&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;orion-tech&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;luna&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;age1jgwqs04tphuuklx4g3gjdg42mchagn2gu7sftknerh8y8l9n7v7s27wqgu&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-variable&quot;&gt;master&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-keyword&quot;&gt;in&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;gitlab-runner-reg-config.age&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;publicKeys&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;keys&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;orion-tech&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;luna&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Take note that I have a master key and then a machine specific key for Luna. In the body we define the file that will be
encrypted with the given public keys, in my config that would be &lt;code&gt;gitlab-runner-reg.config.age&lt;/code&gt; which allows either the
master key to decrypt it or Luna’s key to decrypt it.&lt;/p&gt;
&lt;p&gt;Let’s go ahead and create the Gitlab runner config:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-function&quot;&gt;agenix&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;gitlab-runner-reg-config.age&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;ts-variable-parameter&quot;&gt;/path/to/your/age/key&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will open the editor defined in your &lt;code&gt;$EDITOR&lt;/code&gt; with the decrypted contents of the &lt;code&gt;gitlab-runner-reg-config.age&lt;/code&gt;
file.&lt;/p&gt;
&lt;p&gt;Let’s go ahead and fill that out and save it in this format from earlier:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;CI_SERVER_URL=&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;url-here&gt;REGISTRATION_TOKEN=&lt;/url-here&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Great! We have our secret. How do we access it in our flake?&lt;/p&gt;
&lt;p&gt;Earlier we had a &lt;code&gt;services.gitlab-runner&lt;/code&gt; which had a &lt;code&gt;registrationConfigFile&lt;/code&gt; setting. Instead of using &lt;code&gt;toString &amp;#x3C;PATH-HERE&gt;&lt;/code&gt; we’ll now use our secret like so:&lt;/p&gt;
&lt;pre class=&quot;ts-highlighted&quot;&gt;&lt;code class=&quot;language-nix&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-variable&quot;&gt;age&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;secrets&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;gitlab-runner-reg-config&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-function&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt;  &lt;span class=&quot;ts-string-special&quot;&gt;../secrets/gitlab-runner-reg-config.age&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-variable&quot;&gt;services&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;gitlab-runner&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;enable&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-variable-member&quot;&gt;services&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-variable-member&quot;&gt;default&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-keyword&quot;&gt;with&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;lib&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;registrationConfigFile&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-variable&quot;&gt;config&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;age&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;secrets&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;gitlab-runner-reg-config&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ts-variable-member&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;dockerImage&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;alpine&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-variable-member&quot;&gt;tagList&lt;/span&gt; &lt;span class=&quot;ts-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ts-punctuation&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;alpine&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;ts-string&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;      &lt;span class=&quot;ts-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;  &lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;ts-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;ts-punctuation-delimiter&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Replace &lt;code&gt;../secrets/gitlab-runner-reg-config.age&lt;/code&gt; with the path to your secret.&lt;/p&gt;
&lt;p&gt;You’re done, that’s it. Pretty neat, huh?&lt;/p&gt;
&lt;p&gt;If you don’t like storing your secrets in a public repository you can of course add the &lt;code&gt;secrets&lt;/code&gt; directory in as a git
submodule from a private repository if you so desire. You can read up on git submodules if that caught your interest
&lt;a href=&quot;https://git-scm.com/book/en/v2/Git-Tools-Submodules&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h1 id=&quot;the-end&quot;&gt;&lt;a href=&quot;#the-end&quot;&gt;The End?&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The end indeed. You should have Gitlab with a runner rocking now on your server and, if you followed the secrets
section, secrets managed in your config.&lt;/p&gt;
&lt;p&gt;If you want to see my config in all of its hideousness, you can find it &lt;a href=&quot;https://gitlab.orion-technologies.io/philler/nixos&quot;&gt;here&lt;/a&gt;;&lt;/p&gt;
&lt;p&gt;If you found anything wrong or egregious feel free to file an issue on the &lt;a href=&quot;https://github.com/PriceHiller/blog&quot;&gt;Github Mirror&lt;/a&gt;.&lt;/p&gt;</content:encoded></item></channel></rss>