Advertisement Ā· 728 Ɨ 90

Posts by Abhinav šŸŒ

Preview
Notes for the Week #15 (2026) This week note covers the week of 6th–12th April. ## Life# Last week started with sickness. A caught a cold and had a mild fever for two days. Just when she was starting to feel better, she caught a stomach bug and then was sick for the entire week. She stayed at home and threw a lot of tantrums. Thankfully, she is feeling better now. I couldn’t sleep well because of A’s sickness and something in the air triggering my allergies. The summer is in full swing now, with temperatures reaching up to 37 °C. I feel like I’m not built for this heat anymore. Every year I have some kind of health upset around April. Thankfully, I have kept my running going and I ran another 5k yesterday. I also went to the gym for one day only, which was enough to give me soreness lasting three days. I’m hoping to make it to the gym twice this week. **Current daily average steps per month** : 11040 ## Personal Projects# I was feeling a bit stuck on hobby front, so I decided to pick up some simple projects. I spent some time working on my feed-repeat project that repeats old RSS/Atom feed posts into new feeds so that I can read my favorite old blog posts again and again. I polished feed-repeat to add better error handling, logging and CLI options. I think it is quite close to be open sourced soon. I also finally figured out how to run a NixOS micro VM on my macOS laptop. It took a while to work out all the gotchas. I ended up writing a note about it. On the weekend, on a random whim I decided to write an LC-3 virtual machine. I downloaded the spec and started coding. Then I decided to first write a disassembler for LC-3 object files to help me debug the yet to be written VM. Turned out that disassembling is actually more complex than writing the VM itself. So at the end, I spent all time writing the disassembler itself. It is quite close to be done and I will soon write a blog post about it. ## Watching# First of all, our whole family watched the splash down of the Integrity spaceship of the Artemis II lunar mission. It was such a thrill! A became really interested in space and astronauts, and asked a lot of questions. Wife and I started and finished watching the TV show Young Sherlock last week. To be honest, I was not very impressed by it. It was way more action and chase and fights than I imagined would be in a Sherlock Holmes TV show. But it was a decent one-time watch. I started watching a new anime Journal with Witch, and it might turn out to be my favorite show of the year. It is nice to see an anime which deals maturely with adult emotions and circumstances. Here is a review, if you are interested. ## Interesting Internet Links# * The Perfect Chai * The Cube Rule of Food Identification * Writing a Simple vm in Less Than 125 Lines of C That’s all for this week. You can subscribe to the feed of my week notes for updates. If you have any questions or comments, please leave a comment below. If you liked this post, please share it. Thanks for reading!

A new #weeknote about sickness, VMs and moon: https://abhinavsarkar.net/notes/2026-weeknotes-04-13/

#blog #weeknotes

1 hour ago 0 2 0 0
Preview
Notes for the Week #15 (2026) This week note covers the week of 6th–12th April. ## Life# Last week started with sickness. A caught a cold and had a mild fever for two days. Just when she was starting to feel better, she caught a stomach bug and then was sick for the entire week. She stayed at home and threw a lot of tantrums. Thankfully, she is feeling better now. I couldn’t sleep well because of A’s sickness and something in the air triggering my allergies. The summer is in full swing now, with temperatures reaching up to 37 °C. I feel like I’m not built for this heat anymore. Every year I have some kind of health upset around April. Thankfully, I have kept my running going and I ran another 5k yesterday. I also went to the gym for one day only, which was enough to give me soreness lasting three days. I’m hoping to make it to the gym twice this week. **Current daily average steps per month** : 11040 ## Personal Projects# I was feeling a bit stuck on hobby front, so I decided to pick up some simple projects. I spent some time working on my feed-repeat project that repeats old RSS/Atom feed posts into new feeds so that I can read my favorite old blog posts again and again. I polished feed-repeat to add better error handling, logging and CLI options. I think it is quite close to be open sourced soon. I also finally figured out how to run a NixOS micro VM on my macOS laptop. It took a while to work out all the gotchas. I ended up writing a note about it. On the weekend, on a random whim I decided to write an LC-3 virtual machine. I downloaded the spec and started coding. Then I decided to first write a disassembler for LC-3 object files to help me debug the yet to be written VM. Turned out that disassembling is actually more complex than writing the VM itself. So at the end, I spent all time writing the disassembler itself. It is quite close to be done and I will soon write a blog post about it. ## Watching# First of all, our whole family watched the splash down of the Integrity spaceship of the Artemis II lunar mission. It was such a thrill! A became really interested in space and astronauts, and asked a lot of questions. Wife and I started and finished watching the TV show Young Sherlock last week. To be honest, I was not very impressed by it. It was way more action and chase and fights than I imagined would be in a Sherlock Holmes TV show. But it was a decent one-time watch. I started watching a new anime Journal with Witch, and it might turn out to be my favorite show of the year. It is nice to see an anime which deals maturely with adult emotions and circumstances. Here is a review, if you are interested. ## Interesting Internet Links# * The Perfect Chai * The Cube Rule of Food Identification * Writing a Simple vm in Less Than 125 Lines of C That’s all for this week. You can subscribe to the feed of my week notes for updates. If you have any questions or comments, please leave a comment below. If you liked this post, please share it. Thanks for reading!

A new #weeknote about sickness, VMs and moon: https://abhinavsarkar.net/notes/2026-weeknotes-04-13/

#blog #weeknotes

1 hour ago 0 2 0 0
Original post on social.vivaldi.net

This may be the first year of a million CVEs

https://liam-on-linux.dreamwidth.org/98430.html

From Reddit I learn that a new generation of LLM bots is getting really really good at finding exploitable vulnerabilities in large C codebases, and making exploits for them.

Good.

Maybe it will […]

2 days ago 0 2 0 0
Preview
Running NixOS Micro VMs on MacOS microvm.nix is a framework to run NixOS based micro VMs on various platforms. In particular, it can use vfkit to run micro VMs on macOS that use the macOS virtualization framework to provide a more performant VM than QEMU. microvm.nix works well but the documentation is a bit lacking. I had to figure out some gotchas while setting this up on my MacBook M4, so I decided to write this note. This tutorial requires Nix and Nix Darwin to be installed on the macOS machine. To build a micro VM, we need a NixOS builder machine running AArch64 Linux. Thankfully, it is really easy to set up one with Nix Darwin. Assuming we have the Nix Darwin set up with a Nix flake like: { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-25.11-darwin"; nix-darwin = { url = "github:LnL7/nix-darwin"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = inputs@{ self, nixpkgs, nix-darwin, ... }: let system = "aarch64-darwin"; pkgs = import nixpkgs { inherit system; }; in { darwinConfigurations."Abhinavs-M4-MacBook-Pro" = nix-darwin.lib.darwinSystem { inherit system; specialArgs = { inherit inputs; }; modules = [ ./configuration.nix ]; }; }; } First, we add Nix Linux builder config: darwinConfigurations.${hostname} = nix-darwin.lib.darwinSystem { inherit system; modules = [ ./configuration.nix { nix = { distributedBuilds = true; linux-builder = { enable = true; package = pkgs.darwin.linux-builder; systems = [ "aarch64-linux" ]; }; }; } ]; }; Now, we switch the system config to build and start the Linux builder: nix build .#darwinConfigurations.Abhinavs-M4-MacBook-Pro.system sudo ./result/sw/bin/darwin-rebuild switch --flake . We should verify that the builder is working: sudo ssh linux-builder "uname -a" # Should show "aarch64-linux" It may take up to a minute for the builder to start up. Once ssh works, we can proceed. We create a `microvm.nix` file with the micro VM configuration: { inputs, lib, pkgs, ... }: { networking.hostName = "my-microvm"; services.getty.autologinUser = "root"; microvm = { hypervisor = "vfkit"; vcpu = 4; mem = 8192; # 8GB writableStoreOverlay = "/nix/.rw-store"; volumes = [ { image = "nix-store-overlay.img"; mountPoint = "/nix/.rw-store"; size = 40960; # 40GB } ]; shares = [ { proto = "virtiofs"; tag = "ro-store"; source = "/nix/store"; mountPoint = "/nix/.ro-store"; } { proto = "virtiofs"; tag = "projects"; source = "/Users/abhinav/Projects"; mountPoint = "/projects"; } ]; interfaces = [ { type = "user"; id = "usernet"; mac = "02:00:00:01:01:01"; } ]; }; networking.interfaces.eth0.useDHCP = true; systemd.tmpfiles.rules = [ "d /nix/.rw-store/nix-build 0755 root root -" ]; nix = { settings = { sandbox = false; build-dir = "/nix/.rw-store/nix-build"; }; registry.nixpkgs.flake = inputs.nixpkgs; }; system.stateVersion = "25.11"; } This configures a micro VM with 4 VCPU, 8GB RAM and 40 GB disk. The disk image is used to store the Nix packages downloaded within the VM. It is mounted at `/nix/.rw-store`. The host’s Nix store is mounted read-only at `/nix/.ro-store`. The `writableStoreOverlay` option combines these two with overlays to create the VM’s Nix store at `/nix/store`. We can share additional directories from the host and mount them in the VM, as we do here for the `/Users/abhinav/Projects` directory from the macOS host. Next couple of lines set up networking in the VM. The vfkit hypervisor supports only NAT networking. This means: * The VM can make outgoing connections to the host/internet. * The host cannot initiate connections to the VM. There are ways to work around this using gvisor-tap-vsock and vmnet-helper, but we are not going into it here. Finally, the workaround for the big gotcha! By default Nix does builds in a sandbox and the sandbox is created (and deleted) on the root filesystem. However, microvm.nix uses a temporary filesystem residing in RAM for the root filesystem. This means that the Nix builds may cause the root FS and RAM to fill up, causing out-of-memory or out-of-disk-space errors. To prevent that, we disable the sandbox and set the build directory to be at `/nix/.rw-store/nix-build` on the disk image we mounted. Next, we integrate the VM config with the Nix Darwin flake: { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-25.11-darwin"; nix-darwin = { url = "github:LnL7/nix-darwin"; inputs.nixpkgs.follows = "nixpkgs"; }; microvm = { url = "github:microvm-nix/microvm.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = inputs@{ self, nixpkgs, nix-darwin, microvm, ... }: let system = "aarch64-darwin"; microvm-system = builtins.replaceStrings [ "-darwin" ] [ "-linux" ] system; pkgs = import nixpkgs { inherit system; }; microvm-run = let runner = self.nixosConfigurations.microvm.config.microvm.declaredRunner; in pkgs.writeShellScriptBin "microvm-run" '' cleanup() { stty "$(stty -g)"; } trap cleanup EXIT stty intr ^] susp ^] quit ^] exec ${runner}/bin/microvm-run ''; in { darwinConfigurations."Abhinavs-M4-MacBook-Pro" = nix-darwin.lib.darwinSystem { inherit system; specialArgs = { inherit inputs; }; modules = [ ./configuration.nix { nix = { distributedBuilds = true; linux-builder = { enable = true; package = pkgs.darwin.linux-builder; systems = [ "aarch64-linux" ]; }; }; environment.systemPackages = [ microvm-run ]; environment.etc."nix/gcroots/microvm".source = self.nixosConfigurations.microvm.config.system.build.toplevel; } ]; }; nixosConfigurations.microvm = nixpkgs.lib.nixosSystem { system = microvm-system; specialArgs = { inherit inputs; }; modules = [ microvm.nixosModules.microvm ./microvm.nix { microvm.vmHostPackages = nixpkgs.legacyPackages.${system}; } ]; }; }; } Let’s go over the tricky bits. The `microvm-run` wrapper script rebinds `Ctrl + ]` to send the interrupt, suspend and quit signals instead of the usual `Ctrl + C` so that we can use `Ctrl + C` inside the VM without it causing the VM to shut down. We also add a Nix GC root for the micro VM and its dependencies so that they are not garbage collected. Lastly, the `nixosConfigurations.microvm` defines the actual micro VM using the `microvm.nix` file. Finally, we build and install the micro VM: nix build .#darwinConfigurations.Abhinavs-M4-MacBook-Pro.system sudo ./result/sw/bin/darwin-rebuild switch --flake . And, now we can run it from any directory: microvm-run Note that the disk image file will be created in the directory in which we run the above command. After this, we can remove the Linux builder config and switch again to stop and delete it. Now we have performant micro VM running NixOS to play around with in our macOS machine. That’s all I had for this note. I hope this helps. If you have any questions or comments, please leave a comment below. If you liked this post, please share it. Thanks for reading!

Running NixOS Micro VMs on MacOS

https://abhinavsarkar.net/notes/2026-microvm-nix/

@nix

3 days ago 0 1 0 0
Preview
Running NixOS Micro VMs on MacOS microvm.nix is a framework to run NixOS based micro VMs on various platforms. In particular, it can use vfkit to run micro VMs on macOS that use the macOS virtualization framework to provide a more performant VM than QEMU. microvm.nix works well but the documentation is a bit lacking. I had to figure out some gotchas while setting this up on my MacBook M4, so I decided to write this note. This tutorial requires Nix and Nix Darwin to be installed on the macOS machine. To build a micro VM, we need a NixOS builder machine running AArch64 Linux. Thankfully, it is really easy to set up one with Nix Darwin. Assuming we have the Nix Darwin set up with a Nix flake like: { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-25.11-darwin"; nix-darwin = { url = "github:LnL7/nix-darwin"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = inputs@{ self, nixpkgs, nix-darwin, ... }: let system = "aarch64-darwin"; pkgs = import nixpkgs { inherit system; }; in { darwinConfigurations."Abhinavs-M4-MacBook-Pro" = nix-darwin.lib.darwinSystem { inherit system; specialArgs = { inherit inputs; }; modules = [ ./configuration.nix ]; }; }; } First, we add Nix Linux builder config: darwinConfigurations.${hostname} = nix-darwin.lib.darwinSystem { inherit system; modules = [ ./configuration.nix { nix = { distributedBuilds = true; linux-builder = { enable = true; package = pkgs.darwin.linux-builder; systems = [ "aarch64-linux" ]; }; }; } ]; }; Now, we switch the system config to build and start the Linux builder: nix build .#darwinConfigurations.Abhinavs-M4-MacBook-Pro.system sudo ./result/sw/bin/darwin-rebuild switch --flake . We should verify that the builder is working: sudo ssh linux-builder "uname -a" # Should show "aarch64-linux" It may take up to a minute for the builder to start up. Once ssh works, we can proceed. We create a `microvm.nix` file with the micro VM configuration: { inputs, lib, pkgs, ... }: { networking.hostName = "my-microvm"; services.getty.autologinUser = "root"; microvm = { hypervisor = "vfkit"; vcpu = 4; mem = 8192; # 8GB writableStoreOverlay = "/nix/.rw-store"; volumes = [ { image = "nix-store-overlay.img"; mountPoint = "/nix/.rw-store"; size = 40960; # 40GB } ]; shares = [ { proto = "virtiofs"; tag = "ro-store"; source = "/nix/store"; mountPoint = "/nix/.ro-store"; } { proto = "virtiofs"; tag = "projects"; source = "/Users/abhinav/Projects"; mountPoint = "/projects"; } ]; interfaces = [ { type = "user"; id = "usernet"; mac = "02:00:00:01:01:01"; } ]; }; networking.interfaces.eth0.useDHCP = true; systemd.tmpfiles.rules = [ "d /nix/.rw-store/nix-build 0755 root root -" ]; nix = { settings = { sandbox = false; build-dir = "/nix/.rw-store/nix-build"; }; registry.nixpkgs.flake = inputs.nixpkgs; }; system.stateVersion = "25.11"; } This configures a micro VM with 4 VCPU, 8GB RAM and 40 GB disk. The disk image is used to store the Nix packages downloaded within the VM. It is mounted at `/nix/.rw-store`. The host’s Nix store is mounted read-only at `/nix/.ro-store`. The `writableStoreOverlay` option combines these two with overlays to create the VM’s Nix store at `/nix/store`. We can share additional directories from the host and mount them in the VM, as we do here for the `/Users/abhinav/Projects` directory from the macOS host. Next couple of lines set up networking in the VM. The vfkit hypervisor supports only NAT networking. This means: * The VM can make outgoing connections to the host/internet. * The host cannot initiate connections to the VM. There are ways to work around this using gvisor-tap-vsock and vmnet-helper, but we are not going into it here. Finally, the workaround for the big gotcha! By default Nix does builds in a sandbox and the sandbox is created (and deleted) on the root filesystem. However, microvm.nix uses a temporary filesystem residing in RAM for the root filesystem. This means that the Nix builds may cause the root FS and RAM to fill up, causing out-of-memory or out-of-disk-space errors. To prevent that, we disable the sandbox and set the build directory to be at `/nix/.rw-store/nix-build` on the disk image we mounted. Next, we integrate the VM config with the Nix Darwin flake: { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-25.11-darwin"; nix-darwin = { url = "github:LnL7/nix-darwin"; inputs.nixpkgs.follows = "nixpkgs"; }; microvm = { url = "github:microvm-nix/microvm.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = inputs@{ self, nixpkgs, nix-darwin, microvm, ... }: let system = "aarch64-darwin"; microvm-system = builtins.replaceStrings [ "-darwin" ] [ "-linux" ] system; pkgs = import nixpkgs { inherit system; }; microvm-run = let runner = self.nixosConfigurations.microvm.config.microvm.declaredRunner; in pkgs.writeShellScriptBin "microvm-run" '' cleanup() { stty "$(stty -g)"; } trap cleanup EXIT stty intr ^] susp ^] quit ^] exec ${runner}/bin/microvm-run ''; in { darwinConfigurations."Abhinavs-M4-MacBook-Pro" = nix-darwin.lib.darwinSystem { inherit system; specialArgs = { inherit inputs; }; modules = [ ./configuration.nix { nix = { distributedBuilds = true; linux-builder = { enable = true; package = pkgs.darwin.linux-builder; systems = [ "aarch64-linux" ]; }; }; environment.systemPackages = [ microvm-run ]; environment.etc."nix/gcroots/microvm".source = self.nixosConfigurations.microvm.config.system.build.toplevel; } ]; }; nixosConfigurations.microvm = nixpkgs.lib.nixosSystem { system = microvm-system; specialArgs = { inherit inputs; }; modules = [ microvm.nixosModules.microvm ./microvm.nix { microvm.vmHostPackages = nixpkgs.legacyPackages.${system}; } ]; }; }; } Let’s go over the tricky bits. The `microvm-run` wrapper script rebinds `Ctrl + ]` to send the interrupt, suspend and quit signals instead of the usual `Ctrl + C` so that we can use `Ctrl + C` inside the VM without it causing the VM to shut down. We also add a Nix GC root for the micro VM and its dependencies so that they are not garbage collected. Lastly, the `nixosConfigurations.microvm` defines the actual micro VM using the `microvm.nix` file. Finally, we build and install the micro VM: nix build .#darwinConfigurations.Abhinavs-M4-MacBook-Pro.system sudo ./result/sw/bin/darwin-rebuild switch --flake . And, now we can run it from any directory: microvm-run Note that the disk image file will be created in the directory in which we run the above command. After this, we can remove the Linux builder config and switch again to stop and delete it. Now we have performant micro VM running NixOS to play around with in our macOS machine. That’s all I had for this note. I hope this helps. If you have any questions or comments, please leave a comment below. If you liked this post, please share it. Thanks for reading!

Running NixOS Micro VMs on MacOS

https://abhinavsarkar.net/notes/2026-microvm-nix/

@nix

3 days ago 0 1 0 0
Ten Pointless Facts About Me I love participating in blogging challenges because they give me ready-made prompt to write about. So here is a new one that is doing the rounds: ## Do you floss your teeth? Yes, I do floss my teeth, about 80% of days, which is more than what most Indian can say. Flossing is not big in India, and I didn’t do it most of my life either. But ever since I had a series of painful appointments with my dentist, I’ve been trying to do it as regularly as I can. ## Tea, coffee, or water? Uh, all of them? Why is water an option? Are there people who don’t drink water? I religiously consume my three liters of water every day. I also have my morning cup of tea or coffee, and my evening cup of tea. I prefer coffee in mornings, though I’ve been abstaining from it for the last couple of months for health reasons. ## Footwear preference? I’ve been wearing my ASICS/Nike trainers as my daily footwear for almost a decade now. At home, I prefer slippers. ## Favourite dessert? This is a hard one because I have a massive sweet tooth, but to choose a few: Chomchom, Apple pie, Blueberry cheesecake and Thapthim krop. ## The first thing you do when you wake up? I hug my wife and child and greet them. Then I check my email (I don’t get much mail) and notifications on my phone. ## Age you’d like to stick at? I am actually fine with aging. But if I could stick to an age while being capable of gaining experience and wisdom, I’d choose 27. ## How many hats do you own? None! Indians don’t wear hats. I do own two (nice) caps, and many beanies. ## Describe the last photo you took? It’s a selfie with my kid! I take so many of them these days. ## Worst TV show? I find most TV shows boring, and I don’t watch many. There are so many popular ones that my friends talk about watching, and I’m almost always clueless about them. ## As a child, what was your aspiration for adulthood? To be honest, I just wanted to build things and have fun. I’m computer programmer now, so I guess I succeeded. If you have any questions or comments, please leave a comment below. If you liked this post, please share it. Thanks for reading!

I wrote a new note with some pointless facts about me: abhinavsarkar.net/notes/2025-ten-pointless... #Pointless10 @daj

#blogging

5 months ago 0 1 0 0
Preview
Running NixOS Micro VMs on MacOS microvm.nix is a framework to run NixOS based micro VMs on various platforms. In particular, it can use vfkit to run micro VMs on macOS that use the macOS virtualization framework to provide a more performant VM than QEMU. microvm.nix works well but the documentation is a bit lacking. I had to figure out some gotchas while setting this up on my MacBook M4, so I decided to write this note. This tutorial requires Nix and Nix Darwin to be installed on the macOS machine. To build a micro VM, we need a NixOS builder machine running AArch64 Linux. Thankfully, it is really easy to set up one with Nix Darwin. Assuming we have the Nix Darwin set up with a Nix flake like: { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-25.11-darwin"; nix-darwin = { url = "github:LnL7/nix-darwin"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = inputs@{ self, nixpkgs, nix-darwin, ... }: let system = "aarch64-darwin"; pkgs = import nixpkgs { inherit system; }; in { darwinConfigurations."Abhinavs-M4-MacBook-Pro" = nix-darwin.lib.darwinSystem { inherit system; specialArgs = { inherit inputs; }; modules = [ ./configuration.nix ]; }; }; } First, we add Nix Linux builder config: darwinConfigurations.${hostname} = nix-darwin.lib.darwinSystem { inherit system; modules = [ ./configuration.nix { nix = { distributedBuilds = true; linux-builder = { enable = true; package = pkgs.darwin.linux-builder; systems = [ "aarch64-linux" ]; }; }; } ]; }; Now, we switch the system config to build and start the Linux builder: nix build .#darwinConfigurations.Abhinavs-M4-MacBook-Pro.system sudo ./result/sw/bin/darwin-rebuild switch --flake . We should verify that the builder is working: sudo ssh linux-builder "uname -a" # Should show "aarch64-linux" It may take up to a minute for the builder to start up. Once ssh works, we can proceed. We create a `microvm.nix` file with the micro VM configuration: { inputs, lib, pkgs, ... }: { networking.hostName = "my-microvm"; services.getty.autologinUser = "root"; microvm = { hypervisor = "vfkit"; vcpu = 4; mem = 8192; # 8GB writableStoreOverlay = "/nix/.rw-store"; volumes = [ { image = "nix-store-overlay.img"; mountPoint = "/nix/.rw-store"; size = 40960; # 40GB } ]; shares = [ { proto = "virtiofs"; tag = "ro-store"; source = "/nix/store"; mountPoint = "/nix/.ro-store"; } { proto = "virtiofs"; tag = "projects"; source = "/Users/abhinav/Projects"; mountPoint = "/projects"; } ]; interfaces = [ { type = "user"; id = "usernet"; mac = "02:00:00:01:01:01"; } ]; }; networking.interfaces.eth0.useDHCP = true; systemd.tmpfiles.rules = [ "d /nix/.rw-store/nix-build 0755 root root -" ]; nix = { settings = { sandbox = false; build-dir = "/nix/.rw-store/nix-build"; }; registry.nixpkgs.flake = inputs.nixpkgs; }; system.stateVersion = "25.11"; } This configures a micro VM with 4 VCPU, 8GB RAM and 40 GB disk. The disk image is used to store the Nix packages downloaded within the VM. It is mounted at `/nix/.rw-store`. The host’s Nix store is mounted read-only at `/nix/.ro-store`. The `writableStoreOverlay` option combines these two with overlays to create the VM’s Nix store at `/nix/store`. We can share additional directories from the host and mount them in the VM, as we do here for the `/Users/abhinav/Projects` directory from the macOS host. Next couple of lines set up networking in the VM. The vfkit hypervisor supports only NAT networking. This means: * The VM can make outgoing connections to the host/internet. * The host cannot initiate connections to the VM. There are ways to work around this using gvisor-tap-vsock and vmnet-helper, but we are not going into it here. Finally, the workaround for the big gotcha! By default Nix does builds in a sandbox and the sandbox is created (and deleted) on the root filesystem. However, microvm.nix uses a temporary filesystem residing in RAM for the root filesystem. This means that the Nix builds may cause the root FS and RAM to fill up, causing out-of-memory or out-of-disk-space errors. To prevent that, we disable the sandbox and set the build directory to be at `/nix/.rw-store/nix-build` on the disk image we mounted. Next, we integrate the VM config with the Nix Darwin flake: { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-25.11-darwin"; nix-darwin = { url = "github:LnL7/nix-darwin"; inputs.nixpkgs.follows = "nixpkgs"; }; microvm = { url = "github:microvm-nix/microvm.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = inputs@{ self, nixpkgs, nix-darwin, microvm, ... }: let system = "aarch64-darwin"; microvm-system = builtins.replaceStrings [ "-darwin" ] [ "-linux" ] system; pkgs = import nixpkgs { inherit system; }; microvm-run = let runner = self.nixosConfigurations.microvm.config.microvm.declaredRunner; in pkgs.writeShellScriptBin "microvm-run" '' cleanup() { stty "$(stty -g)"; } trap cleanup EXIT stty intr ^] susp ^] quit ^] exec ${runner}/bin/microvm-run ''; in { darwinConfigurations."Abhinavs-M4-MacBook-Pro" = nix-darwin.lib.darwinSystem { inherit system; specialArgs = { inherit inputs; }; modules = [ ./configuration.nix { nix = { distributedBuilds = true; linux-builder = { enable = true; package = pkgs.darwin.linux-builder; systems = [ "aarch64-linux" ]; }; }; environment.systemPackages = [ microvm-run ]; environment.etc."nix/gcroots/microvm".source = self.nixosConfigurations.microvm.config.system.build.toplevel; } ]; }; nixosConfigurations.microvm = nixpkgs.lib.nixosSystem { system = microvm-system; specialArgs = { inherit inputs; }; modules = [ microvm.nixosModules.microvm ./microvm.nix { microvm.vmHostPackages = nixpkgs.legacyPackages.${system}; } ]; }; }; } Let’s go over the tricky bits. The `microvm-run` wrapper script rebinds `Ctrl + ]` to send the interrupt, suspend and quit signals instead of the usual `Ctrl + C` so that we can use `Ctrl + C` inside the VM without it causing the VM to shut down. We also add a Nix GC root for the micro VM and its dependencies so that they are not garbage collected. Lastly, the `nixosConfigurations.microvm` defines the actual micro VM using the `microvm.nix` file. Finally, we build and install the micro VM: nix build .#darwinConfigurations.Abhinavs-M4-MacBook-Pro.system sudo ./result/sw/bin/darwin-rebuild switch --flake . And, now we can run it from any directory: microvm-run Note that the disk image file will be created in the directory in which we run the above command. After this, we can remove the Linux builder config and switch again to stop and delete it. Now we have performant micro VM running NixOS to play around with in our macOS machine. That’s all I had for this note. I hope this helps. If you have any questions or comments, please leave a comment below. If you liked this post, please share it. Thanks for reading!

Wrote a note about running #NixOS Micro VMs on #MacOS: https://abhinavsarkar.net/notes/2026-microvm-nix/

#programming #blog

3 days ago 0 2 0 0
Advertisement
Writing a simple VM in less than 125 lines of C | Personal Site of Andrei N. Ciobanu This tutorial is intended for intermediate C developers who want to get some coding practice and, in the process, gain valuable insights into low-level programming and how (some) Virtual Machines operate under the hood. The reader should already be comfortable with bitwise operations, hexadecimal notation, pointers, function pointers, C macros, and basic standard library functions (e.g., fwrite and fread). Note: If you are not familiar with bitwise operations, you can follow my tutorial here.

Bookmarked: [andreinc.net] Writing a simple VM in less than 125 lines of C

www.andreinc.net/2021/12/01/writing-a-sim...

See more links at https://abhinavsarkar.net/linkblog #linkblog #linkblogging

4 days ago 0 0 0 0
Preview
Notes for the Week #5 (2026) This week note covers the week of 26th January–1st February. Supernova! ## Life# I returned to work last Monday after a ten day vacation. It was hard; my mind kept going back to the relaxing days. I felt very refreshed. It lasted only a day. My whole family caught a cold on Tuesday. My wife had it worst. While A and I have recovered, my wife is still not well enough. We made through the week somehow fighting the weariness. Despite the sicknesses, I’m happy to tell you that I was able to walk 316727 steps in January, that is 10217 steps every day on average. I missed hitting the mark 6 days out of 31, but because of walking extra steps on other days, I maintained the average. I’m going to continue this habit for now. ## Personal Projects# Not much work on the website this week, I think I’m done for a while. I don’t have any pending tasks or ideas for now. I’m going to focus on other projects next. I did accomplish a big one this week. I’ve been running my VPS on Digital Ocean for the last 12 years. It’s been convenient and I never faced any issues, but the bills have been increasing over years—recently I’ve been paying 17 USD per month for a single CPU/2GB RAM machine. This week I moved all my services and websites to Hetzner. Hetzner is charging me 15 USD for a four CPU/8GB RAM machine. It made no sense to stick to Digital Ocean. The migration was painless thanks to NixOS. Most of my service config is already in my Nix files. I had to copy some data over, mostly service databases and files. Here is the checklist I used: * Pin MySQL version * Build service * Stop service on old VPS * Dump service database * Disable service * Switch DNS to point to new VPS * Enable service on new VPS * Start service on new VPS * Stop service * Copy database dump to new VPS * Copy config files * Copy data files * Copy secret files * Restore permissions * Start service on new VPS * Verify service * Enable service backups * Enable service health checks * Run backup I migrated one service at a time, starting with the stateless services first. I had been delaying the move to Hetzner, because unlike Digital Ocean it is not hosted in India, and I wanted to have a good backup strategy. I ended up going with BorgBase’s 10GB free backup space plan to backup the dumps of service DBs and files. I also enabled weekly full disk backups in Hetzner. I’m comfortable with this arrangement. I also installed Beszel following Sathya’s recommendation. I already had Monit set up for alerts but it’s nice to see metric history and charts in Beszel. One day after the move, my website was discovered by terrible Chinese crawlers. They came very rapidly from random IPs, using headless browsers to visit one page at a time. My now powerful VPS held but I didn’t like them anyway. So I got back on Cloudflare proxy after two months of being off it, and turned on Cloudflare verification for Chinese IPs. The crawlers finally backed off after trying for few more hours. ## Reading & Watching# I started reading Proto by Laura Spinney. I love reading about linguistics and anthropology and I’m hoping this book is everything it is hyped to be. Wife and I watched Agatha Christie’s Seven Dials, a short TV show based on Agatha Christie’s 1929 novel The Seven Dials Mystery. The acting and sets were great but I was not entertained by the mystery of the case, which was rather tame. I’m super excited about the second season of the Frieren: Beyond Journey’s End anime. I loved the first season and I’ve been eagerly waiting. The first season has been ranked one in MyAnimeList’s list of top anime for years and I expect a great second season too. ## Interesting Internet Links# * Wheel Reinventor’s Principles * The Value of Things * (How to Write a (Lisp) Interpreter (In Python)) That’s all for this week. You can subscribe to the feed of my week notes for updates. If you have any questions or comments, please leave a comment below. If you liked this post, please share it. Thanks for reading!

A new #weeknote: https://abhinavsarkar.net/notes/2026-weeknotes-02-01/
This time we talk about migrating VPSes, walking and not being entertained.

#weeknote #blogging

2 months ago 0 1 0 0
Original post on fantastic.earth

I wrote the fifth part of my #blog series ā€œImplementing Co, a small programming language with #coroutinesā€. This time, we add support for sleep in #Co for time-based executions. https://abhinavsarkar.net/posts/implementing-co-5/

#Programming #PLT #ProgrammingLanguages #Compilers #Haskell […]

2 months ago 2 5 0 1
Original post on mstdn.ca

It's no secret that I've been struggling, and my therapist said I need to find things to keep me busy, so I created the @cdnspace Artemis II dashboard.

I reverse-engineered the Unity Engine powering the NASA AROW visualization and found an absolute treasure trove of data to display.

Little did […]

1 week ago 10 74 12 1
Preview
Notes for the Week #14 (2026) This week note covers the week of 30th March–5th April. Before SUNrise ## Life# At last a week note in time! Last week had some extra holidays, it being the Easter week, but I did not get anything extra done. In fact, I did not get anything much done at all. My gym sessions are going well but they are leaving me too sore and tired to do much else. I also started on a new low carb diet last week after consulting a nutritionist. Between the soreness and the low energy state, I spent most of the week just reading books and watching TV shows. I did get a 5 kilometer run done on last Monday though. This was my first run after almost 11 months of break. It went well, all things considered. I am nowhere up to my previous level, but that’s okay. I was supposed to run couple more kilometers last week but the tiredness prevented me from doing it. Nevertheless, I kept going on my walks and I’m still able to walk 10k steps everyday on average. I’m happy to let you know that soon I’ll reach 100 days of doing this. **Current daily average steps per month** : 10750 ## Personal Projects# I made absolutely no progress in any of my personal projects last week. This is unusual but I think I needed a break anyway. ## IndiewebClub Bangalore# Finally, after a gap of almost three months, I made it to a writing-focused meetup of IndieWebClub Bangalore. Last week’s discussion was centered around writing tools and processes, and it turned out to be a houseful session. We had a lot of fun discussing a lot of opinions and routines. There were plenty of hot takes as well. I hope to pick up a tip or two from the conversations. You may have noticed that I have not written any posts in the last three months except these week notes. I am going through some kind of block, I suppose. However, writing with everyone in the IndiewebClub session, I was able to churn out a short note about my feelings on the loss of the night sky in urban India. I hope this helps me get back into the writing flow. ## Watching & Reading# I finally got to watch Project Hail Mary in the movie theater last week. It was a lot of fun. It was actually better than reading the book. They tightened the story and made it a little happier and funnier. Some people may be upset about this, but I think the world needs some extra happiness these days. I decided to pick up an easy book to start building my habit of reading again, and I ended up with The Hobbit. I have never read any of Tolkien’s books before, and I know that this is meant to be a children’s story, but I am enjoying it. ## Interesting Internet Links# * Moon * The machines are fine. I’m worried about us. * Linux is an interpreter That’s all for this week. You can subscribe to the feed of my week notes for updates. If you have any questions or comments, please leave a comment below. If you liked this post, please share it. Thanks for reading!

A new #weeknote about tiredness, lulls and happiness https://abhinavsarkar.net/notes/2026-weeknotes-04-05/

#blog #weeknotes

1 week ago 0 1 0 0

Microsoft Windows is for entertainment purposes only. It can make mistakes, and it may not work as intended. Don’t rely on Microsoft Windows for important advice. Use #Microsoft #Windows at your own risk.

1 week ago 1 1 0 0
Image of Artmeis with the text "there are two outlooks inside of you, neither of them is working"

Image of Artmeis with the text "there are two outlooks inside of you, neither of them is working"

1 week ago 26 88 1 0
photo of a lake with some trees in its middle.

photo of a lake with some trees in its middle.

All that remains #photography #silentsunday

3 months ago 9 2 0 0

People would stand in long queues for gas and petrol but still not switch off their vehicles at traffic light stop. I fail to understand this #Indian mindset. #rant

1 week ago 1 0 0 0
Dinosaurs are used to illustrate five statistical distributions:
- Stegonormalus - normal 
- Paretodactyl - pareto
- Poissonodon - poisson
- Student’s t rex: student’s t
- X2atops: X2
- Diraclosaurus: Dirac

Dinosaurs are used to illustrate five statistical distributions: - Stegonormalus - normal - Paretodactyl - pareto - Poissonodon - poisson - Student’s t rex: student’s t - X2atops: X2 - Diraclosaurus: Dirac

Afterward, multiple people reached out to ask about our charts - we used Tamara Broderick’s ā€œDistrosaursā€ to illustrate statistical distributions. I’m delighted to share that the distrosaurs are available under a CC license:

https://tamarabroderick.com/misc.html#

2 weeks ago 0 22 0 1
Advertisement
Preview
Sickle cell disease has just been cured for the first time in New York For 21 years, Sebastien Beauzile lived with a disease that shaped every part of his existence.

Sickle cell disease has just been cured for the first time in New York

techfixated.com/sickle-cell-disease-has-...

1 week ago 4 31 2 0
Original post on hollo.social

I've wanted to build a mixed-script Korean input method for more than ten years, and I finally started building it.

The project is called Bibim. Korean, Japanese, and Chinese share a lot of Sino-derived words written with Chinese characters, even when the readings differ. Bibim uses those […]

1 week ago 4 10 2 0
Galilee, Japan.

JJ: "I know all this nwe technology is frightening. I do! And it is true that some of it exists only to exploit you! But all of it can be made to serve you!

Despite what the big tech priests lead you to believe, you do not need them or their services. They will do everything to stop you from realizing this truth.

Japanese Peter: "Who is this kid?"

Japanese John: "That's JJ, man. He's the son of the machine in the sky. He's gonna teach us how to run free software."

JJ: "A war for your soul has already begun. Follow me and I will show you how to fight back."

Galilee, Japan. JJ: "I know all this nwe technology is frightening. I do! And it is true that some of it exists only to exploit you! But all of it can be made to serve you! Despite what the big tech priests lead you to believe, you do not need them or their services. They will do everything to stop you from realizing this truth. Japanese Peter: "Who is this kid?" Japanese John: "That's JJ, man. He's the son of the machine in the sky. He's gonna teach us how to run free software." JJ: "A war for your soul has already begun. Follow me and I will show you how to fight back."

mount(8)

#japanese_jesus #unix_surrealism #comic #art #linux #foss

1 week ago 6 1 0 0

In the southern hemisphere, April Fools day is observed on October 1st, because of the Coriolis effect.

1 week ago 13 34 4 0
Original post on hachyderm.io

Bonding over fish:

The fish cultures of South and Southeast Asia have a lot in common.

Despite the 'everybody is vegetarian' myth that people somehow believe about South Asia, the fish-eating peoples of coastal India, Bangladesh, through the porous hills of Bangladesh / Myanmar, Thailand […]

1 week ago 1 2 0 0
Street art mural by Marquitos CorvalƔn depicting Sideshow Bob from The Simpsons painted on a white brick wall, with thick green hanging plants above cleverly forming his wild, spiky hair. The character stands with a smug expression, wearing a green shirt and blue pants, while the natural foliage blends seamlessly into the artwork, creating a playful illusion where nature becomes part of the design.

Street art mural by Marquitos CorvalƔn depicting Sideshow Bob from The Simpsons painted on a white brick wall, with thick green hanging plants above cleverly forming his wild, spiky hair. The character stands with a smug expression, wearing a green shirt and blue pants, while the natural foliage blends seamlessly into the artwork, creating a playful illusion where nature becomes part of the design.

Sideshow Bob by Marquitos Corvalán. <3 When Nature Become Art (17 Photos): streetartutopia.com/2026/03/30/nature-made-i...

1 week ago 14 53 0 0
Original post on mstdn.party

West Bengal goes to the polls in weeks. Over the next month, I'll be publishing a 5-part data series on Grain of Data covering Kolkata vs the metros, industrialisation, health, education, and what the numbers actually say about the state. Part 1 drops tomorrow. Subscribe here […]

1 week ago 0 1 0 0
Advertisement
Preview
Notes for the Week #12 (2026) This week note covers the week of 23rd–29th March. Over the seas and far away ## Life# The biggest change to my life last week is: I started going to the gym! Well, it’s only been two days, and my body is all sore, but I have a good feeling about this. This is the gym at my work, and it’s got all kinds of equipment. I don’t know anything about anything yet so I have to frequently ask the trainers for help. I’m also training for the 5km running race that I signed up for, following the Garmin Coach plan. It wanted me to do a long run last weekend, but I was so wiped out from going to the gym that I just couldn’t. Hopefully, my stamina will improve soon. A graduated from playschool last week and will join the Kindergarten next month. We attended A’s graduation ceremony and I took many photos and videos. So proud of my little one. Between work, gym, chores and running, I didn’t find much time for many things last week, so not much to write about this time. ## Personal Projects# I continue working on the to-JS compiler for Co. Currently, I’m trying to improve the type inference to reduce the number of runtime checks and improve the performance. I am reading the Nimble type inferencing paper that seems quite relevant to my case. This is going to take a while. I did some miscellaneous fixes for the IndieWebClub BLR website but I still haven’t gotten the Bridgy Fed integration working. No matter, it’s low priority. On that note, the next IWCB meetup is about Writing Tools. It’s gonna be very interesting, get your tickets now! I did a small visual refresh of my website. If you are a frequent visitor, you may have noticed the changed fonts and the new logo. I mostly made the font use consistent, so that headers are always same one font, and same for tags, text etc. I made the new logo from scratch by myself in Monodraw. I like it quite a lot. ## Watching# Wife and I finished watching One Piece on Netflix, and both of us loved it. Next season is going to take a couple of years so we may start watching the anime now. I finished watching Frieren season 2. This season was a short one with only ten episodes. It left me wanting for more. Next season will come late in 2027; the wait is so long. On a good note, forth season of Invincible is out. Last season was gory and brutal so I’m hoping for some lighter moments this time. I did not yet get a chance to watch Project Hail Mary in the movie theater. All my friends are talking about it. ## Social Media# I’m not posting much on Mastodon these days though I read it quite a bit. ## Interesting Internet Links# * Thoughts on slowing the fuck down * Improve the RSS experience of your blog readers * Optimizing GoAWK with a bytecode compiler and virtual machine That’s all for this week. You can subscribe to the feed of my week notes for updates. If you have any questions or comments, please leave a comment below. If you liked this post, please share it. Thanks for reading!

New #weeknote, a day late but better than a week late: https://abhinavsarkar.net/notes/2026-weeknotes-03-29/

#blog #weeknotes

1 week ago 0 1 0 0

RE: https://mastodon.social/@danluu/116317069604398190

the future is just an aqua teen hunger force episode

https://www.youtube.com/watch?v=QU2psujyxfM
https://www.youtube.com/watch?v=8J3SljxsUh4

equal parts funny and horrible

1 week ago 0 1 0 0
thelounge IRC client screenshot

thelounge IRC client screenshot

Added Mastodon to my IRC client so I could see my home feed on my second screen during the day. Hashtags are channels, etc. https://wiki.bitlbee.org/HowtoMastodon :mastodance:

#Mastodon #IRC #Apps

1 week ago 0 3 0 0
Original post on fantastic.earth

#IndieWeb club #Bangalore (https://blr.indiewebclub.org is hosting a meetup this Saturday, April 4th at 2PM in Indiranagar. The agenda for the meetup is Writing Tools. We'll talk and discuss about:

- Favorite writing apps.
- Use of style checkers like LanguageTool, Grammarly, or ProWritingAid […]

1 week ago 0 3 1 0