<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
      <title>caret.rs</title>
      <link>https://caret.rs</link>
      <description>backend. game archival. keyboard nerd.</description>
      <generator>Zola</generator>
      <language>en</language>
      <atom:link href="https://caret.rs/rss.xml" rel="self" type="application/rss+xml"/>
      <lastBuildDate>Sun, 29 Mar 2026 00:00:00 +0000</lastBuildDate>
      <item>
          <title>To Game</title>
          <pubDate>Sun, 29 Mar 2026 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://caret.rs/posts/to-game/</link>
          <guid>https://caret.rs/posts/to-game/</guid>
          <description xml:base="https://caret.rs/posts/to-game/">&lt;p&gt;Context:&lt;&#x2F;p&gt;
&lt;p&gt;With the Legacy Console Edition of Minecraft getting leaked again on 4chan, and seeing all the activity with people developing stuff from it, I think the YouTube algorithm decided it would be good to show this channel to me.&lt;&#x2F;p&gt;
&lt;p&gt;https:&#x2F;&#x2F;www.youtube.com&#x2F;@MichaelCarter-g8u&lt;&#x2F;p&gt;
&lt;p&gt;To keep it simple, Michael Carter seems to be an grandpa-aged man who just discovered Minecraft on the Xbox 360, a console that I happened to grow up on (specifically clocking hundreds of hours in the same game). He also made a bunch of film videos before starting this Minecraft series.&lt;&#x2F;p&gt;
&lt;p&gt;https:&#x2F;&#x2F;youtu.be&#x2F;kJwX6Oiph0Y&lt;&#x2F;p&gt;
&lt;p&gt;Watching the video that showed up in my feed made me feel nostalgic. As if I was watching myself play the game for the first time over 10 years ago. It also had me thinking how I would look playing the game in the future, years after I had forgotten how to play.&lt;&#x2F;p&gt;
&lt;p&gt;It honestly just made me feel a little sad. Nostalgia. The memories I have of the game are some of my fondest gaming memories I&#x27;ve made. Building mini games with my brother, always attempting to build a castle in every survival world I started, the day or two of Xbox Live trials I would get from friends to play with them a few times. I&#x27;m so sad the worlds got lost to hard drive failure and me being an idiot (I took apart the drive).&lt;&#x2F;p&gt;
&lt;p&gt;Watching the video knowing that if I played it right now I wouldn&#x27;t really feel the same feelings. Sure, the game acts almost the same, and all the controls and sounds are what my muscles remember, but its not the exact memories I&#x27;d make if I were to play 10 years ago. Watching him play makes me feel like it is.&lt;&#x2F;p&gt;
&lt;p&gt;It&#x27;s weird, wanting to experience something for the first time again. It&#x27;s almost like I wish to forget everything just to experience it again. Is that what nostalgia is? A desire to feel the same feelings in the future?&lt;&#x2F;p&gt;
&lt;p&gt;I don&#x27;t really feel the same about games in general, they just seemed to loose their spark with me. Not entirely sure why, maybe its from my hyper productive mindset, if I&#x27;m not making something, I&#x27;m wasting time, or if I&#x27;m not working on my career, I won&#x27;t improve. Sure thats a good thing in some ways, but I&#x27;m probably over doing it sometimes.&lt;&#x2F;p&gt;
&lt;p&gt;Maybe I&#x27;ll install Xenia and try playing again. Xenia is such an impressive piece of software.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>tokyo</title>
          <pubDate>Fri, 13 Mar 2026 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://caret.rs/photos/tokyo/</link>
          <guid>https://caret.rs/photos/tokyo/</guid>
          <description xml:base="https://caret.rs/photos/tokyo/"></description>
      </item>
      <item>
          <title>cat</title>
          <pubDate>Thu, 01 Jan 2026 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://caret.rs/posts/secret/</link>
          <guid>https://caret.rs/posts/secret/</guid>
          <description xml:base="https://caret.rs/posts/secret/">&lt;p&gt;His name is Tom! Tom was a stray found in the countryside and my great grandfather decided to take him in when he was still a kitten. After our great grandfather passed away, we took Tom to the city. He&#x27;s a quirky little guy. Oh also, Grandpa always called his male cats Tom.&lt;&#x2F;p&gt;
&lt;p&gt;He wants lots of attention and will be sad if you don&#x27;t give him cuddle time. Laying on the couch will attract him to come make biscuits on you while you watch TV.&lt;&#x2F;p&gt;
&lt;p&gt;He also likes to play tag with our dog Rocket!&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Flight</title>
          <pubDate>Thu, 30 Oct 2025 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://caret.rs/posts/flight/</link>
          <guid>https://caret.rs/posts/flight/</guid>
          <description xml:base="https://caret.rs/posts/flight/">&lt;h2 id=&quot;2025nian-9yue-30ri&quot;&gt;2025年9月30日&lt;&#x2F;h2&gt;
&lt;p&gt;It was a dark and chilly evening. The street lights were glowing, one flickered down near the alley. I treaded out my front door not fully processing everything yet. This will likely be the last time I step out that door for a few years, for the first time in my life. My parents helped me load everything into the van. Only 2 large suitcases and the heavy hiking bag on my back. Everything I thought I&#x27;d need living in a different country for at least a year and a half or longer. It was surreal. I&#x27;ve been planning for this since nearly a year ago. Was this the right choice? Do I really want to do what I&#x27;m about to do? Am I making a risk I&#x27;m going to regret later?&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;ve been obsessed with Japan since high school. The friend group I became a part of was already into anime and stuff so naturally I got into it too. Growing up in America, Japan and the culture it has is just so unique and different. I really had no idea that it would be one of the reasons I quit my job, sold nearly all my belongings, and moved to Japan in my 20s chasing a dream I had, whatever it was exactly. Something about the culture, the language, and just the cultural contrast compared to America deeply intrigued me. It intrigued me way past the point of, &#x27;oh its just a phase&#x27;, to the point of, &quot;If I don&#x27;t understand Japanese by the time I die, I don&#x27;t think I&#x27;ll be satisfied with my life&quot;. This is something I want to study and use the rest of my life. This was the first step of reaching that dream. However crazy it sounded.&lt;&#x2F;p&gt;
&lt;p&gt;My parents drove me to the airport. It was nearly midnight, and despite that, there were still quite a few vehicles and people rushing to get to their gate. Going through security, then almost getting lost. I found the international wing. Suddenly, it was eerily quiet. Most of the gates around were closed. I didn&#x27;t see anyone walking there.&lt;&#x2F;p&gt;
&lt;p&gt;I then found it. K19. There were more people there than it sounded like. Nothing loud playing, everyone was tired and if they were talking, a whisper. Was this a funeral reception? I took a seat.&lt;&#x2F;p&gt;
&lt;p&gt;It was just starting to settle in. I&#x27;m leaving. I&#x27;m leaving everything I know and love behind. For what? Just to learn Japanese? To find my purpose in life? I told myself. This was a selfish decision. Saying goodbye to friends and family felt odd. I wasn&#x27;t sure when I&#x27;d see them next. Would someone get mad at me for leaving? Jealous of following my crazy dream? Would I even see everyone I said goodbye to again? I shouldn&#x27;t be asking these questions.&lt;&#x2F;p&gt;
&lt;p&gt;Before I knew it, it was already 1AM. We were about to take off. This was the largest plane I&#x27;ve ever been on in my life. There were 3 whole columns of seats and 3 different centers for what I assumed was food and restrooms. I heard the announcements in Japanese and started messing with the weird infotainment system.&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;m actually doing it. I couldn&#x27;t believe it. My heart palpitated from all the what-if questions, and the anxiety of forgetting something. This was it. There&#x27;s no turning back now.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;2025nian-10yue-1ri&quot;&gt;2025年10月1日&lt;&#x2F;h2&gt;
&lt;p&gt;This was probably the first time I started a new month while in flight. I could not sleep. There&#x27;s no way I could with the lights being on full brightness and a baby crying most of the time.&lt;&#x2F;p&gt;
&lt;p&gt;And oh? Food? At probably 2 in the morning? Why was this part of the schedule!?&lt;&#x2F;p&gt;
&lt;figure&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;caret.rs&#x2F;posts&#x2F;flight&#x2F;plane_meal_1.png&quot; alt=&quot;Plane Meal&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;figcaption&gt;I couldn&#x27;t complain. Free food is free food.&lt;&#x2F;figcaption&gt;
&lt;&#x2F;figure&gt;
&lt;p&gt;After that I tried sleeping. It was impossible. At most I probably got a good 2 hours of sleep, if anything. I was so tired I couldn&#x27;t do anything but sit there. I didn&#x27;t feel like watching anything or listening to music. My brain went into this weird state of autopilot or half consciousness.&lt;&#x2F;p&gt;
&lt;p&gt;After what felt like a fever dream with a second meal around 5 AM, I could see it. Tokyo.&lt;&#x2F;p&gt;
&lt;figure&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;caret.rs&#x2F;posts&#x2F;flight&#x2F;tokyo_probably.png&quot; alt=&quot;Tokyo Probably&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;figcaption&gt;This is the first picture of Japan I took. It&#x27;s entirely possible its not Tokyo but we will assume it is for now.&lt;&#x2F;figcaption&gt;
&lt;&#x2F;figure&gt;
&lt;p&gt;Then shortly after, we landed. Time was already blurring into mush. I could only somewhat process what was happening.&lt;&#x2F;p&gt;
&lt;p&gt;TIME TO TRANSFER PLANES!&lt;&#x2F;p&gt;
&lt;p&gt;I had about 50 minutes to transfer. This included going through customs.&lt;&#x2F;p&gt;
&lt;p&gt;Going through customs was an interesting and somewhat painful experience. I had all the paperwork ready, but there was one form in-person that we fill out before going through. This took me one round through the mini line. Then the guy at the desk needed me to add one more thing to it. I added that thing, then switched lines. Before I knew it, I was walking through awkwardly carrying my luggage and a brand new shiny &lt;em&gt;residence card&lt;&#x2F;em&gt; aka &lt;strong&gt;Zairyu Card&lt;&#x2F;strong&gt; (&lt;strong&gt;在留カード&lt;&#x2F;strong&gt;).&lt;&#x2F;p&gt;
&lt;figure&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;caret.rs&#x2F;posts&#x2F;flight&#x2F;zairyu.png&quot; alt=&quot;Residence Card&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;figcaption&gt;在留カード&lt;&#x2F;figcaption&gt;
&lt;&#x2F;figure&gt;
&lt;p&gt;After that, there was one more step, getting my bags through. Initially, I no idea this was a step. My first attempt at walking through, they asked for a QR code. I was very sleep deprived and probably didn&#x27;t realize the signs around it telling me to do this before trying to go through. Finally, after writing that I have no drugs, weapons, or am planning to sell things to the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Yakuza&quot;&gt;Yakuza&lt;&#x2F;a&gt;, I go through and said my ありがとうございます to the people at the gate.&lt;&#x2F;p&gt;
&lt;p&gt;I was running on mostly adrenaline. I don&#x27;t think I even fully processed what just happened or that I was in Tokyo.&lt;&#x2F;p&gt;
&lt;p&gt;Until I saw Hatsune Miku:&lt;&#x2F;p&gt;
&lt;figure&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;caret.rs&#x2F;posts&#x2F;flight&#x2F;hatsune_miku.png&quot; alt=&quot;Hatsune Miku&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;figcaption&gt;Hatsune Miku is software (NOT an AI) that sings (voice synthesis) and is essentially a pop singer.&lt;&#x2F;figcaption&gt;
&lt;&#x2F;figure&gt;
&lt;p&gt;But really, looking back, it was all very dream like, my vision had a slight blur around the edges. Like it was an old film.&lt;&#x2F;p&gt;
&lt;p&gt;I had one flight left. I had to figure out where the next gate was. Reading the overhead signs and looking around, it looked like I needed to take a shuttle bus there!&lt;&#x2F;p&gt;
&lt;p&gt;I walked one direction, that area was closed, then walked a different way, oh, gotta go up? Then there it was, a bus stop outside. The weather was similar to the weather back home. Thankfully it was not summer. I don&#x27;t think I&#x27;ll do well in the summer, but we&#x27;ll see.&lt;&#x2F;p&gt;
&lt;p&gt;I found the bus! Getting on, someone had to help me because I was literally juggling 3 rolling suitcases.&lt;&#x2F;p&gt;
&lt;p&gt;A few minutes passed.&lt;&#x2F;p&gt;
&lt;p&gt;Then getting off that bus, I loaded them back onto a cart thing, and then had to get them back into the luggage system.&lt;&#x2F;p&gt;
&lt;figure&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;caret.rs&#x2F;posts&#x2F;flight&#x2F;bag_eater_machine.png&quot; alt=&quot;Luggage System&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;figcaption&gt;This thing was insane. I was hoping humans would be doing this, but no. This was all automated.&lt;&#x2F;figcaption&gt;
&lt;&#x2F;figure&gt;
&lt;p&gt;It took me a few tries, and a-panicked-walk-around the entire area once more looking for a human to do this instead, until I frustratingly got it to scan the somewhat mangled QR code sticker by holding it down.&lt;&#x2F;p&gt;
&lt;p&gt;Wow, only like 20 minutes to get through the X-Ray and metal detector. Thankfully that was the one thing that went smoothly and the gate was relatively close. I just had to wait.&lt;&#x2F;p&gt;
&lt;p&gt;Just sitting there, my brain was slowly processing everything. I was in Japan. Everything was so much cleaner. Barely anyone was there, I guess it was early in the morning. About 5:30 AM. Even the free WiFi was better than the one back in the states.&lt;&#x2F;p&gt;
&lt;figure&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;caret.rs&#x2F;posts&#x2F;flight&#x2F;waiting.png&quot; alt=&quot;Airport 2&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;figcaption&gt;Tokyo Airport&lt;&#x2F;figcaption&gt;
&lt;&#x2F;figure&gt;
&lt;p&gt;The flight to Fukuoka was very short. About 2 hours. During that time I didn&#x27;t do much either. I was too tired to watch or listen to anything, but too excited to even try to sleep at this point.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;caret.rs&#x2F;posts&#x2F;flight&#x2F;flight_2.png&quot; alt=&quot;2nd Flight&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Clouds floated by as we neared our destination. Looking down I could see a smaller city (later I would learn this was Kitakyushu, a city an hour ish north of Fukuoka). There were also some islands visible!&lt;&#x2F;p&gt;
&lt;p&gt;It took me a while to write this, my vision was too grand. So I decided to just push this. Hopefully I&#x27;ll get into a rhythm of writing more often. I wanna write about some projects I&#x27;m doing currently, and of course more about living in Fukuoka!&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>fukuoka</title>
          <pubDate>Fri, 10 Oct 2025 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://caret.rs/photos/fukuoka/</link>
          <guid>https://caret.rs/photos/fukuoka/</guid>
          <description xml:base="https://caret.rs/photos/fukuoka/"></description>
      </item>
      <item>
          <title>How to mount a secondary drive using LUKS on NixOS</title>
          <pubDate>Sat, 19 Jul 2025 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://caret.rs/posts/nixos-luks-drive/</link>
          <guid>https://caret.rs/posts/nixos-luks-drive/</guid>
          <description xml:base="https://caret.rs/posts/nixos-luks-drive/">&lt;p&gt;LUKS is nice, but I wanted more encryption for my secondary drive. This would already assume the root system is decrypted before starting this process, so because of that I decided to just use a key file. I&#x27;m not typing a second password in everytime!&lt;&#x2F;p&gt;
&lt;h2 id=&quot;setting-up-the-drive&quot;&gt;Setting up the drive&lt;&#x2F;h2&gt;
&lt;p&gt;Assuming you have a secondary drive under the device name &lt;code&gt;&#x2F;dev&#x2F;nvme0n1&lt;&#x2F;code&gt;, we will mount it under &lt;code&gt;&#x2F;SSD&lt;&#x2F;code&gt; automatically on boot using a LUKS keyfile. This method is nice because it doesn&#x27;t require the user to type in the password or have TPM functional (although, apparently LUKS supports TPM, maybe I&#x27;ll try that some other time).&lt;&#x2F;p&gt;
&lt;h3 id=&quot;step-1-partition-the-drive&quot;&gt;Step 1: Partition the drive&lt;&#x2F;h3&gt;
&lt;p&gt;First, partition the drive using your partitioner of choice. I like &lt;code&gt;cfdisk&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code data-lang=&quot;bash&quot;&gt;$ sudo cfdisk &#x2F;dev&#x2F;nvme0n1
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create a single partition that uses the entire disk. You can set the partition type to &#x27;Linux filesystem&#x27; (the default).&lt;&#x2F;p&gt;
&lt;h3 id=&quot;step-2-setup-luks-encryption&quot;&gt;Step 2: Setup LUKS encryption&lt;&#x2F;h3&gt;
&lt;p&gt;Initialize the partition with LUKS encryption:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code data-lang=&quot;bash&quot;&gt;$ sudo cryptsetup luksFormat &#x2F;dev&#x2F;nvme0n1p1
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This will prompt you for a recovery passphrase. &lt;strong&gt;Don&#x27;t forget this passphrase&lt;&#x2F;strong&gt; - it&#x27;s your backup method if the key file fails.&lt;&#x2F;p&gt;
&lt;p&gt;Open the encrypted partition to make it usable:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code data-lang=&quot;bash&quot;&gt;$ sudo cryptsetup luksOpen &#x2F;dev&#x2F;nvme0n1p1 ssd
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;step-3-create-the-key-file&quot;&gt;Step 3: Create the key file&lt;&#x2F;h3&gt;
&lt;p&gt;Create a directory for storing secrets and generate a random key file:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code data-lang=&quot;bash&quot;&gt;$ sudo mkdir -p &#x2F;etc&#x2F;nixos&#x2F;secrets
$ sudo dd if=&#x2F;dev&#x2F;urandom of=&#x2F;etc&#x2F;nixos&#x2F;secrets&#x2F;ssd-key bs=1024 count=4
$ sudo chmod 400 &#x2F;etc&#x2F;nixos&#x2F;secrets&#x2F;ssd-key
$ sudo chown root:root &#x2F;etc&#x2F;nixos&#x2F;secrets&#x2F;ssd-key
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This key file is what the system will use for automatic decryption during boot.&lt;&#x2F;p&gt;
&lt;p&gt;Add the key file to your LUKS device:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code data-lang=&quot;bash&quot;&gt;$ sudo cryptsetup luksAddKey &#x2F;dev&#x2F;nvme0n1p1 &#x2F;etc&#x2F;nixos&#x2F;secrets&#x2F;ssd-key
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;step-4-format-and-test&quot;&gt;Step 4: Format and test&lt;&#x2F;h3&gt;
&lt;p&gt;Format the decrypted partition with your preferred filesystem:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code data-lang=&quot;bash&quot;&gt;$ sudo mkfs.ext4 -L ssd-data &#x2F;dev&#x2F;mapper&#x2F;ssd
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Test mounting it manually:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code data-lang=&quot;bash&quot;&gt;$ sudo mkdir -p &#x2F;SSD
$ sudo mount &#x2F;dev&#x2F;mapper&#x2F;ssd &#x2F;SSD
$ ls -la &#x2F;SSD
$ sudo umount &#x2F;SSD
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Close the LUKS device to test the key file:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code data-lang=&quot;bash&quot;&gt;$ sudo cryptsetup luksClose ssd
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now test unlocking with the key file:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code data-lang=&quot;bash&quot;&gt;$ sudo cryptsetup luksOpen &#x2F;dev&#x2F;nvme0n1p1 ssd --key-file &#x2F;etc&#x2F;nixos&#x2F;secrets&#x2F;ssd-key
$ sudo mount &#x2F;dev&#x2F;mapper&#x2F;ssd &#x2F;SSD
$ ls -la &#x2F;SSD  # Should show lost+found directory
$ sudo umount &#x2F;SSD
$ sudo cryptsetup luksClose ssd
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If all of that works, you&#x27;re ready to configure NixOS for automatic mounting.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;adding-to-nixos-configuration&quot;&gt;Adding to NixOS Configuration&lt;&#x2F;h2&gt;
&lt;p&gt;Now we need to configure NixOS to automatically unlock and mount this drive on boot.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;step-1-find-your-luks-uuid&quot;&gt;Step 1: Find your LUKS UUID&lt;&#x2F;h3&gt;
&lt;p&gt;First, get the UUID of your LUKS partition:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code data-lang=&quot;bash&quot;&gt;$ sudo blkid &#x2F;dev&#x2F;nvme0n1p1
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Look for the line with &lt;code&gt;TYPE=&quot;crypto_LUKS&quot;&lt;&#x2F;code&gt; and note the UUID value.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;step-2-update-your-nixos-configuration&quot;&gt;Step 2: Update your NixOS configuration&lt;&#x2F;h3&gt;
&lt;p&gt;Add the following to your &lt;code&gt;&#x2F;etc&#x2F;nixos&#x2F;configuration.nix&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code data-lang=&quot;nix&quot;&gt;{ config, pkgs, ... }:

{
  # Mount after booting
  environment.etc.&amp;quot;crypttab&amp;quot;.text = &amp;#39;&amp;#39;
    ssd &#x2F;dev&#x2F;disk&#x2F;by-uuid&#x2F;YOUR-LUKS-UUID-HERE &#x2F;etc&#x2F;nixos&#x2F;secrets&#x2F;ssd-key luks,nofail
  &amp;#39;&amp;#39;;

  # Mount the encrypted drive at &#x2F;SSD
  fileSystems.&amp;quot;&#x2F;SSD&amp;quot; = {
    device = &amp;quot;&#x2F;dev&#x2F;mapper&#x2F;ssd&amp;quot;;
    fsType = &amp;quot;ext4&amp;quot;;
    options = [ &amp;quot;defaults&amp;quot; &amp;quot;user&amp;quot; &amp;quot;rw&amp;quot; &amp;quot;nofail&amp;quot; ];
  };

  # Create the mount point directory
  systemd.tmpfiles.rules = [
    &amp;quot;d &#x2F;SSD 0755 root root -&amp;quot;
  ];

  # Rest of your configuration...
}
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;step-3-rebuild-and-test&quot;&gt;Step 3: Rebuild and test&lt;&#x2F;h3&gt;
&lt;p&gt;Apply the configuration:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code data-lang=&quot;bash&quot;&gt;$ sudo nixos-rebuild switch
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If there are no errors, reboot to test:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code data-lang=&quot;bash&quot;&gt;$ sudo reboot
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;After reboot, check that your drive is automatically mounted:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code data-lang=&quot;bash&quot;&gt;$ df -h | grep SSD
$ ls -la &#x2F;SSD
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;troubleshooting&quot;&gt;Troubleshooting&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;drive-not-mounting-automatically&quot;&gt;Drive not mounting automatically&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;Check that the UUID in your config matches: &lt;code&gt;sudo blkid &#x2F;dev&#x2F;nvme0n1p1&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Verify key file permissions: &lt;code&gt;ls -la &#x2F;etc&#x2F;nixos&#x2F;secrets&#x2F;ssd-key&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Check system logs: &lt;code&gt;sudo journalctl -b | grep -i luks&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;permission-issues&quot;&gt;Permission issues&lt;&#x2F;h3&gt;
&lt;p&gt;Make sure the mount point has correct permissions:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code data-lang=&quot;bash&quot;&gt;$ sudo chown $USER:users &#x2F;SSD
$ sudo chmod 755 &#x2F;SSD
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;recovery&quot;&gt;Recovery&lt;&#x2F;h3&gt;
&lt;p&gt;If you need to access the drive manually (e.g., the key file is lost):&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code data-lang=&quot;bash&quot;&gt;$ sudo cryptsetup luksOpen &#x2F;dev&#x2F;nvme0n1p1 ssd  # Will prompt for passphrase
$ sudo mount &#x2F;dev&#x2F;mapper&#x2F;ssd &#x2F;SSD
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;security-notes&quot;&gt;Security Notes&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;The key file is stored on your root filesystem, so this setup only protects against casual access or drive theft (assuming your root drive is also encrypted)&lt;&#x2F;li&gt;
&lt;li&gt;For maximum security, you could store the key file on a separate USB drive&lt;&#x2F;li&gt;
&lt;li&gt;Always keep a backup of your LUKS header: &lt;code&gt;sudo cryptsetup luksHeaderBackup &#x2F;dev&#x2F;nvme0n1p1 --header-backup-file ~&#x2F;luks-backup.img&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Remember your recovery passphrase - it&#x27;s your fallback if the key file fails&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;This setup gives you the convenience of automatic mounting while maintaining encryption for your secondary drive data.&lt;&#x2F;p&gt;
</description>
      </item>
    </channel>
</rss>
