Skip to content

Darwin support #397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Darwin support #397

wants to merge 1 commit into from

Conversation

esselius
Copy link

@esselius esselius commented Aug 8, 2025

Almost 1:1 copy of #373 with very minor changes, seems to work as expected :)

@astro
Copy link
Collaborator

astro commented Aug 13, 2025

Apple users, please review and test

@mattfield
Copy link

mattfield commented Aug 15, 2025

I gave this a try on my M3 MBP and seems to work well! I took the default flake template and tweaked slightly:

{
  description = "NixOS in MicroVMs";

  nixConfig = {
    extra-substituters = ["https://microvm.cachix.org"];
    extra-trusted-public-keys = ["microvm.cachix.org-1:oXnBc6hRE3eX5rSYdRyMYXnfzcCxC7yKPTbZXALsqys="];
  };

  inputs.microvm = {
    url = "github:microvm-nix/microvm.nix/pull/397/head";
    inputs.nixpkgs.follows = "nixpkgs";
  };

  outputs = {
    self,
    nixpkgs,
    microvm,
  }: let
    system = "aarch64-darwin"; # <-- switched to Darwin
  in {
    packages.${system} = {
      default = self.packages.${system}.my-microvm;
      my-microvm = self.nixosConfigurations.my-microvm.config.microvm.declaredRunner;
    };

    nixosConfigurations = {
      my-microvm = nixpkgs.lib.nixosSystem {
        system = "aarch64-linux"; # <-- explicitly set 
        modules = [
          microvm.nixosModules.microvm
          {
            networking.hostName = "my-microvm";
            users.users.root.password = "";
            microvm = {
              vmHostPackages = nixpkgs.legacyPackages.aarch64-darwin.pkgs; # <-- added as per the PR
              volumes = [
                {
                  mountPoint = "/var";
                  image = "var.img";
                  size = 256;
                }
              ];
              shares = [
                {
                  # use proto = "virtiofs" for MicroVMs that are started by systemd
                  proto = "9p";
                  tag = "ro-store";
                  # a host's /nix/store will be picked up so that no
                  # squashfs/erofs will be built for it.
                  source = "/nix/store";
                  mountPoint = "/nix/.ro-store";
                }
              ];

              # "qemu" has 9p built-in!
              hypervisor = "qemu";
              socket = "control.socket";
            };
          }
        ];
      };
    };
  };
}

Running nix build .#my-microvm spins up a qemu VM with interactive console session:

Full output:
❯ nix run .#my-microvm
trace: evaluation warning: system.stateVersion is not set, defaulting to 25.11. Read why this matters on https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersion.
mke2fs 1.47.2 (1-Jan-2025)
Creating filesystem with 262144 1k blocks and 65536 inodes
Filesystem UUID: e4f99bfb-85e2-4ce0-9100-157250dc1e30
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729, 204801, 221185

Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

[    0.103911] armv8-pmu pmu: hw perfevents: failed to probe PMU!
Booting initrd of NixOS 25.11 (Xantusia) (Initrd).
[  OK  ] Created slice Slice /system/modprobe.
[  OK  ] Created slice Slice /system/systemd-fsck.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
         Expecting device /dev/vda...
[  OK  ] Reached target Initrd Root Device.
[  OK  ] Reached target Path Units.
[  OK  ] Reached target Slice Units.
[  OK  ] Reached target Swaps.
[  OK  ] Reached target Timer Units.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Sockets.
[  OK  ] Listening on udev Control Socket.
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Reached target Socket Units.
         Starting Create List of Static Device Nodes...
         Starting Load Kernel Module configfs...
         Starting Journal Service...
         Starting Load Kernel Modules...
         Starting Coldplug All udev Devices...
[  OK  ] Finished Create List of Static Device Nodes.
[  OK  ] Finished Load Kernel Module configfs.
         Mounting Kernel Configuration File System...
         Starting Create Static Device Nodes in /dev gracefully...
[  OK  ] Mounted Kernel Configuration File System.
[  OK  ] Finished Create Static Device Nodes in /dev gracefully.
         Starting Create Static Device Nodes in /dev...
[  OK  ] Started Journal Service.
[  OK  ] Finished Create Static Device Nodes in /dev.
[  OK  ] Reached target Preparation for Local File Systems.
[  OK  ] Reached target Local File Systems.
         Starting Create System Files and Directories...
         Starting Rule-based Manager for Device Events and Files...
[  OK  ] Finished Load Kernel Modules.
         Starting Apply Kernel Variables...
[  OK  ] Finished Apply Kernel Variables.
[  OK  ] Finished Create System Files and Directories.
[  OK  ] Started Rule-based Manager for Device Events and Files.
[  OK  ] Finished Coldplug All udev Devices.
[  OK  ] Reached target System Initialization.
[  OK  ] Reached target Basic System.
[  OK  ] Found device /dev/vda.
         Starting File System Check on /dev/vda...
[  OK  ] Finished File System Check on /dev/vda.
         Starting Virtual Console Setup...
[  OK  ] Finished Virtual Console Setup.
         Mounting /sysroot...
[  OK  ] Mounted /sysroot.
[  OK  ] Reached target Initrd Root File System.
         Starting Mountpoints Configured in the Real Root...
[  OK  ] Finished Mountpoints Configured in the Real Root.
         Mounting /sysroot/nix/.ro-store...
         Mounting /sysroot/run...
         Mounting /sysroot/var...
[  OK  ] Mounted /sysroot/run.
[  OK  ] Mounted /sysroot/nix/.ro-store.
         Mounting /sysroot/nix/store...
[  OK  ] Mounted /sysroot/var.
[  OK  ] Mounted /sysroot/nix/store.
[  OK  ] Reached target Initrd File Systems.
         Starting Find NixOS closure...
         Starting Create Volatile Files and Directories in the Real Root...
[  OK  ] Finished Create Volatile Files and Directories in the Real Root.
[  OK  ] Finished Find NixOS closure.
[  OK  ] Reached target Initrd Default Target.
         Starting Cleaning Up and Shutting Down Daemons...
[  OK  ] Stopped target Initrd Default Target.
[  OK  ] Stopped target Basic System.
[  OK  ] Stopped target Initrd Root Device.
[  OK  ] Stopped target Path Units.
[  OK  ] Stopped Dispatch Password Requests to Console Directory Watch.
[  OK  ] Stopped target Slice Units.
[  OK  ] Stopped target Socket Units.
[  OK  ] Stopped target System Initialization.
[  OK  ] Stopped target Swaps.
[  OK  ] Stopped target Timer Units.
[  OK  ] Stopped Find NixOS closure.
[  OK  ] Stopped Apply Kernel Variables.
[  OK  ] Stopped Create Volatile Files and Directories in the Real Root.
[  OK  ] Stopped Create System Files and Directories.
[  OK  ] Stopped target Local File Systems.
[  OK  ] Stopped target Preparation for Local File Systems.
[  OK  ] Stopped Coldplug All udev Devices.
         Stopping Rule-based Manager for Device Events and Files...
[  OK  ] Stopped Virtual Console Setup.
[  OK  ] Finished Cleaning Up and Shutting Down Daemons.
[  OK  ] Stopped Rule-based Manager for Device Events and Files.
[  OK  ] Closed udev Control Socket.
[  OK  ] Closed udev Kernel Socket.
         Starting Cleanup udev Database...
[  OK  ] Stopped Create Static Device Nodes in /dev.
[  OK  ] Stopped Create Static Device Nodes in /dev gracefully.
[  OK  ] Stopped Create List of Static Device Nodes.
[  OK  ] Finished Cleanup udev Database.
[  OK  ] Reached target Switch Root.
         Starting NixOS Activation...
[  OK  ] Finished NixOS Activation.
         Starting Switch Root...

Welcome to NixOS 25.11 (Xantusia)!

[  OK  ] Stopped initrd-switch-root.service.
[  OK  ] Created slice Slice /system/getty.
[  OK  ] Created slice Slice /system/serial-getty.
[  OK  ] Created slice User and Session Slice.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
         Expecting device /dev/ttyAMA0...
[  OK  ] Reached target Local Encrypted Volumes.
[  OK  ] Stopped target initrd-fs.target.
[  OK  ] Stopped target initrd-root-fs.target.
[  OK  ] Stopped target initrd-switch-root.target.
[  OK  ] Reached target Containers.
[  OK  ] Reached target Path Units.
[  OK  ] Reached target Remote File Systems.
[  OK  ] Reached target Slice Units.
[  OK  ] Reached target Swaps.
[  OK  ] Listening on Process Core Dump Socket.
[  OK  ] Listening on Credential Encryption/Decryption.
[  OK  ] Listening on Journal Audit Socket.
[  OK  ] Listening on Network Service Netlink Socket.
[  OK  ] Listening on Userspace Out-Of-Memory (OOM) Killer Socket.
[  OK  ] Listening on udev Control Socket.
[  OK  ] Listening on udev Kernel Socket.
         Mounting Huge Pages File System...
         Mounting POSIX Message Queue File System...
         Mounting Kernel Debug File System...
         Mounting Kernel Trace File System...
         Starting Firewall...
         Starting Create List of Static Device Nodes...
         Starting Load Kernel Module configfs...
         Starting Load Kernel Module drm...
         Starting Load Kernel Module efi_pstore...
         Starting Load Kernel Module fuse...
         Starting Journal Service...
         Starting Userspace Out-Of-Memory (OOM) Killer...
         Starting Remount Root and Kernel File Systems...
         Starting Apply Kernel Variables...
         Starting Coldplug All udev Devices...
[  OK  ] Mounted Huge Pages File System.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted Kernel Debug File System.
[  OK  ] Mounted Kernel Trace File System.
[  OK  ] Finished Create List of Static Device Nodes.
[  OK  ] Finished Load Kernel Module configfs.
[  OK  ] Finished Load Kernel Module drm.
[  OK  ] Finished Load Kernel Module efi_pstore.
[  OK  ] Finished Load Kernel Module fuse.
[  OK  ] Started Journal Service.
         Mounting FUSE Control File System...
         Mounting Kernel Configuration File System...
         Starting Create Static Device Nodes in /dev gracefully...
[  OK  ] Finished Remount Root and Kernel File Systems.
         Starting Flush Journal to Persistent Storage...
         Starting Load/Save OS Random Seed...
         Starting Network Time Synchronization...
[  OK  ] Started Userspace Out-Of-Memory (OOM) Killer.
[  OK  ] Finished Apply Kernel Variables.
[  OK  ] Mounted FUSE Control File System.
[  OK  ] Mounted Kernel Configuration File System.
         Starting Network Name Resolution...
[  OK  ] Finished Flush Journal to Persistent Storage.
[  OK  ] Finished Load/Save OS Random Seed.
[  OK  ] Reached target First Boot Complete.
[  OK  ] Finished Create Static Device Nodes in /dev gracefully.
         Starting Create Static Device Nodes in /dev...
[  OK  ] Finished Create Static Device Nodes in /dev.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Finished Coldplug All udev Devices.
[  OK  ] Reached target Preparation for Local File Systems.
         Mounting /run/wrappers...
         Starting Rule-based Manager for Device Events and Files...
[  OK  ] Started Network Name Resolution.
[  OK  ] Mounted /run/wrappers.
[  OK  ] Reached target Local File Systems.
[  OK  ] Listening on Boot Entries Service Socket.
         Starting Create SUID/SGID Wrappers...
         Starting Save Transient machine-id to Disk...
         Starting Create System Files and Directories...
[  OK  ] Finished Save Transient machine-id to Disk.
[  OK  ] Finished Create System Files and Directories.
         Starting Rebuild Journal Catalog...
         Starting Record System Boot/Shutdown in UTMP...
[  OK  ] Started Rule-based Manager for Device Events and Files.
         Starting Load Kernel Module configfs...
[  OK  ] Finished Record System Boot/Shutdown in UTMP.
[  OK  ] Finished Rebuild Journal Catalog.
         Starting Load Kernel Module fuse...
         Starting Update is Completed...
[  OK  ] Finished Load Kernel Module configfs.
[  OK  ] Finished Update is Completed.
[  OK  ] Finished Load Kernel Module fuse.
[  OK  ] Finished Create SUID/SGID Wrappers.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Discard unused filesystem blocks once a week.
[  OK  ] Started logrotate.timer.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Timer Units.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Listening on Hostname Service Socket.
[  OK  ] Reached target Socket Units.
[  OK  ] Reached target Basic System.
         Starting Logrotate configuration check...
         Starting Name Service Cache Daemon (nsncd)...
[  OK  ] Started Reset console on configuration changes.
         Starting D-Bus System Message Bus...
[  OK  ] Finished Logrotate configuration check.
[  OK  ] Started Name Service Cache Daemon (nsncd).
[  OK  ] Reached target Host and Network Name Lookups.
[  OK  ] Reached target User and Group Name Lookups.
         Starting User Login Management...
[  OK  ] Started User Login Management.
[  OK  ] Started D-Bus System Message Bus.
         Starting Virtual Console Setup...
[  OK  ] Finished Firewall.
[  OK  ] Reached target Preparation for Network.
         Starting Network Configuration...
[  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
[  OK  ] Started Network Configuration.
[  OK  ] Reached target Network.
         Starting Enable Persistent Storage in systemd-networkd...
         Starting Permit User Sessions...
[  OK  ] Finished Enable Persistent Storage in systemd-networkd.
[  OK  ] Finished Permit User Sessions.
[  OK  ] Started Getty on tty1.
[  OK  ] Started Serial Getty on ttyAMA0.
[  OK  ] Reached target Login Prompts.
[  OK  ] Reached target Multi-User System.
[  OK  ] Finished Virtual Console Setup.


<<< Welcome to NixOS 25.11.19700101.dirty (aarch64) - ttyAMA0 >>>

Run 'nixos-help' for the NixOS manual.

my-microvm login: root

[root@my-microvm:~]# dmesg | grep virt
[    0.000000] Machine model: linux,dummy-virt
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[    0.055513] virtio-pci 0000:00:01.0: enabling device (0000 -> 0003)
[    0.055772] virtio-pci 0000:00:02.0: enabling device (0000 -> 0003)
[    0.056016] virtio-pci 0000:00:03.0: enabling device (0000 -> 0003)
[    0.062500] virtio_blk virtio1: 1/0/0 default/read/poll queues
[    0.062753] virtio_blk virtio1: [vda] 524288 512-byte logical blocks (268 MB/256 MiB)
[    0.114743] systemd[1]: Detected virtualization qemu.
[    6.269770] systemd[1]: Detected virtualization qemu.

Building from a different configuration via the nix-darwin linux builder also works as expected:

Flake:
{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    microvm = {
      url = "github:microvm-nix/microvm.nix/pull/397/head";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = inputs: {
    nixosConfigurations.vm = inputs.nixpkgs.lib.nixosSystem {
      system = "aarch64-linux";
      modules = [
        inputs.microvm.nixosModules.microvm
        {
          networking.hostName = "vm";
          users.users.root.password = "";
          microvm = {
            hypervisor = "qemu";
            socket = "control.socket";
            vmHostPackages = inputs.nixpkgs.legacyPackages.aarch64-darwin.pkgs;
            mem = 1024;
            vcpu = 1;
            shares = [
              {
                proto = "9p";
                tag = "ro-store";
                source = "/nix/store";
                mountPoint = "/nix/.ro-store";
              }
            ];
          };
          system.stateVersion = "25.11";
          services.getty.autologinUser = "root";
        }
      ];
    };
  };
}
Full output:
[    0.108244] armv8-pmu pmu: hw perfevents: failed to probe PMU!
Booting initrd of NixOS 25.11 (Xantusia) (Initrd).
[  OK  ] Created slice Slice /system/modprobe.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Reached target Initrd Root Device.
[  OK  ] Reached target Path Units.
[  OK  ] Reached target Slice Units.
[  OK  ] Reached target Swaps.
[  OK  ] Reached target Timer Units.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Sockets.
[  OK  ] Listening on udev Control Socket.
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Reached target Socket Units.
         Starting Create List of Static Device Nodes...
         Starting Load Kernel Module configfs...
         Starting Journal Service...
         Starting Load Kernel Modules...
         Starting Coldplug All udev Devices...
[  OK  ] Finished Create List of Static Device Nodes.
[  OK  ] Finished Load Kernel Module configfs.
         Mounting Kernel Configuration File System...
         Starting Create Static Device Nodes in /dev gracefully...
[  OK  ] Mounted Kernel Configuration File System.
[  OK  ] Finished Create Static Device Nodes in /dev gracefully.
         Starting Create Static Device Nodes in /dev...
[  OK  ] Started Journal Service.
[  OK  ] Finished Load Kernel Modules.
         Starting Apply Kernel Variables...
[  OK  ] Finished Create Static Device Nodes in /dev.
[  OK  ] Reached target Preparation for Local File Systems.
[  OK  ] Reached target Local File Systems.
         Starting Create System Files and Directories...
         Starting Rule-based Manager for Device Events and Files...
[  OK  ] Finished Apply Kernel Variables.
[  OK  ] Finished Create System Files and Directories.
[  OK  ] Started Rule-based Manager for Device Events and Files.
[  OK  ] Finished Coldplug All udev Devices.
[  OK  ] Reached target System Initialization.
[  OK  ] Reached target Basic System.
         Starting Virtual Console Setup...
[  OK  ] Finished Virtual Console Setup.
         Mounting /sysroot...
[  OK  ] Mounted /sysroot.
[  OK  ] Reached target Initrd Root File System.
         Starting Mountpoints Configured in the Real Root...
[  OK  ] Finished Mountpoints Configured in the Real Root.
         Mounting /sysroot/nix/.ro-store...
         Mounting /sysroot/run...
[  OK  ] Mounted /sysroot/run.
[  OK  ] Mounted /sysroot/nix/.ro-store.
         Mounting /sysroot/nix/store...
[  OK  ] Mounted /sysroot/nix/store.
[  OK  ] Reached target Initrd File Systems.
         Starting Find NixOS closure...
         Starting Create Volatile Files and Directories in the Real Root...
[  OK  ] Finished Create Volatile Files and Directories in the Real Root.
[  OK  ] Finished Find NixOS closure.
[  OK  ] Reached target Initrd Default Target.
         Starting Cleaning Up and Shutting Down Daemons...
[  OK  ] Stopped target Initrd Default Target.
[  OK  ] Stopped target Basic System.
[  OK  ] Stopped target Initrd Root Device.
[  OK  ] Stopped target Path Units.
[  OK  ] Stopped Dispatch Password Requests to Console Directory Watch.
[  OK  ] Stopped target Slice Units.
[  OK  ] Stopped target Socket Units.
[  OK  ] Stopped target System Initialization.
[  OK  ] Stopped target Swaps.
[  OK  ] Stopped target Timer Units.
[  OK  ] Stopped Find NixOS closure.
[  OK  ] Stopped Apply Kernel Variables.
[  OK  ] Stopped Create Volatile Files and Directories in the Real Root.
[  OK  ] Stopped Create System Files and Directories.
[  OK  ] Stopped target Local File Systems.
[  OK  ] Stopped target Preparation for Local File Systems.
[  OK  ] Stopped Coldplug All udev Devices.
         Stopping Rule-based Manager for Device Events and Files...
[  OK  ] Stopped Virtual Console Setup.
[  OK  ] Finished Cleaning Up and Shutting Down Daemons.
[  OK  ] Stopped Rule-based Manager for Device Events and Files.
[  OK  ] Closed udev Control Socket.
[  OK  ] Closed udev Kernel Socket.
         Starting Cleanup udev Database...
[  OK  ] Stopped Create Static Device Nodes in /dev.
[  OK  ] Stopped Create Static Device Nodes in /dev gracefully.
[  OK  ] Stopped Create List of Static Device Nodes.
[  OK  ] Finished Cleanup udev Database.
[  OK  ] Reached target Switch Root.
         Starting NixOS Activation...
[  OK  ] Finished NixOS Activation.
         Starting Switch Root...

Welcome to NixOS 25.11 (Xantusia)!

[  OK  ] Stopped initrd-switch-root.service.
[  OK  ] Created slice Slice /system/getty.
[  OK  ] Created slice Slice /system/serial-getty.
[  OK  ] Created slice User and Session Slice.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
         Expecting device /dev/ttyAMA0...
[  OK  ] Reached target Local Encrypted Volumes.
[  OK  ] Stopped target initrd-fs.target.
[  OK  ] Stopped target initrd-root-fs.target.
[  OK  ] Stopped target initrd-switch-root.target.
[  OK  ] Reached target Containers.
[  OK  ] Reached target Path Units.
[  OK  ] Reached target Remote File Systems.
[  OK  ] Reached target Slice Units.
[  OK  ] Reached target Swaps.
[  OK  ] Listening on Process Core Dump Socket.
[  OK  ] Listening on Credential Encryption/Decryption.
[  OK  ] Listening on Journal Audit Socket.
[  OK  ] Listening on Network Service Netlink Socket.
[  OK  ] Listening on Userspace Out-Of-Memory (OOM) Killer Socket.
[  OK  ] Listening on udev Control Socket.
[  OK  ] Listening on udev Kernel Socket.
         Mounting Huge Pages File System...
         Mounting POSIX Message Queue File System...
         Mounting Kernel Debug File System...
         Mounting Kernel Trace File System...
         Starting Firewall...
         Starting Create List of Static Device Nodes...
         Starting Load Kernel Module configfs...
         Starting Load Kernel Module drm...
         Starting Load Kernel Module efi_pstore...
         Starting Load Kernel Module fuse...
         Starting Journal Service...
         Starting Userspace Out-Of-Memory (OOM) Killer...
         Starting Remount Root and Kernel File Systems...
         Starting Apply Kernel Variables...
         Starting Coldplug All udev Devices...
[  OK  ] Mounted Huge Pages File System.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted Kernel Debug File System.
[  OK  ] Mounted Kernel Trace File System.
[  OK  ] Finished Create List of Static Device Nodes.
[  OK  ] Finished Load Kernel Module configfs.
[  OK  ] Finished Load Kernel Module drm.
[  OK  ] Started Journal Service.
[  OK  ] Finished Load Kernel Module efi_pstore.
[  OK  ] Finished Load Kernel Module fuse.
[  OK  ] Finished Remount Root and Kernel File Systems.
         Mounting FUSE Control File System...
         Mounting Kernel Configuration File System...
         Starting Flush Journal to Persistent Storage...
         Starting Load/Save OS Random Seed...
         Starting Network Time Synchronization...
         Starting Create Static Device Nodes in /dev gracefully...
[  OK  ] Started Userspace Out-Of-Memory (OOM) Killer.
[  OK  ] Finished Apply Kernel Variables.
         Starting Network Name Resolution...
[  OK  ] Mounted FUSE Control File System.
[  OK  ] Finished Load/Save OS Random Seed.
[  OK  ] Mounted Kernel Configuration File System.
[  OK  ] Finished Flush Journal to Persistent Storage.
[  OK  ] Reached target First Boot Complete.
[  OK  ] Finished Create Static Device Nodes in /dev gracefully.
         Starting Create Static Device Nodes in /dev...
[  OK  ] Finished Coldplug All udev Devices.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Finished Create Static Device Nodes in /dev.
[  OK  ] Reached target Preparation for Local File Systems.
         Mounting /roles...
         Mounting /run/wrappers...
         Starting Rule-based Manager for Device Events and Files...
[  OK  ] Started Network Name Resolution.
[  OK  ] Mounted /run/wrappers.
[  OK  ] Mounted /roles.
[  OK  ] Reached target Local File Systems.
[  OK  ] Listening on Boot Entries Service Socket.
         Starting Create SUID/SGID Wrappers...
         Starting Save Transient machine-id to Disk...
         Starting Create System Files and Directories...
[  OK  ] Finished Save Transient machine-id to Disk.
[  OK  ] Finished Create System Files and Directories.
         Starting Rebuild Journal Catalog...
         Starting Record System Boot/Shutdown in UTMP...
[  OK  ] Started Rule-based Manager for Device Events and Files.
         Starting Load Kernel Module configfs...
[  OK  ] Finished Rebuild Journal Catalog.
[  OK  ] Finished Record System Boot/Shutdown in UTMP.
         Starting Load Kernel Module fuse...
         Starting Update is Completed...
[  OK  ] Finished Load Kernel Module configfs.
[  OK  ] Finished Load Kernel Module fuse.
[  OK  ] Finished Update is Completed.
[  OK  ] Finished Create SUID/SGID Wrappers.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Discard unused filesystem blocks once a week.
[  OK  ] Started logrotate.timer.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Timer Units.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Listening on Hostname Service Socket.
[  OK  ] Reached target Socket Units.
[  OK  ] Reached target Basic System.
         Starting Logrotate configuration check...
         Starting Name Service Cache Daemon (nsncd)...
[  OK  ] Started Reset console on configuration changes.
         Starting D-Bus System Message Bus...
[  OK  ] Finished Logrotate configuration check.
[  OK  ] Started Name Service Cache Daemon (nsncd).
[  OK  ] Reached target Host and Network Name Lookups.
[  OK  ] Reached target User and Group Name Lookups.
         Starting User Login Management...
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Started User Login Management.
         Starting Virtual Console Setup...
[  OK  ] Finished Firewall.
[  OK  ] Reached target Preparation for Network.
         Starting Network Configuration...
[  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
[  OK  ] Started Network Configuration.
[  OK  ] Reached target Network.
         Starting Enable Persistent Storage in systemd-networkd...
         Starting Permit User Sessions...
[  OK  ] Finished Permit User Sessions.
[  OK  ] Finished Enable Persistent Storage in systemd-networkd.
[  OK  ] Started Getty on tty1.
[  OK  ] Started Serial Getty on ttyAMA0.
[  OK  ] Reached target Login Prompts.
[  OK  ] Reached target Multi-User System.
[  OK  ] Finished Virtual Console Setup.


<<< Welcome to NixOS 25.11.20250812.005433b (aarch64) - ttyAMA0 >>>

Run 'nixos-help' for the NixOS manual.

vm login: root (automatic login)

[root@vm:~]# dmesg | grep virt
[    0.000000] Machine model: linux,dummy-virt
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[    0.059525] virtio-pci 0000:00:01.0: enabling device (0000 -> 0003)
[    0.059800] virtio-pci 0000:00:02.0: enabling device (0000 -> 0003)
[    0.060065] virtio-pci 0000:00:03.0: enabling device (0000 -> 0003)
[    0.120057] systemd[1]: Detected virtualization qemu.
[    6.472923] systemd[1]: Detected virtualization qemu.

EDIT TO ADD: This also works as expected using nixbuild.net as a remote builder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants