Nixos-generate-config bug

i’m still debating if i should use subject nixos-rebuild wiped data in wrong partition or stick to the known facts, since i dont have any logs after this happened … system crashed after nixos-rebuild spewed out an error, after reboot system-d boot menu was empty, i know this can be an hardware issue, but something caught my eye yesterday before this happened today

/etc/fstab drives where mounted with /dev/sda instead of /dev/disk/by-uuid/…

my setup is a btrfs with 4 identical sata drives

sda    
├─sda1 6fcd4311-861f-4b1c-9ba1-c4acef367333
└─sda2 54D9-BB81
sdb    
└─sdb1 6fcd4311-861f-4b1c-9ba1-c4acef367333
sdc    
└─sdc1 6fcd4311-861f-4b1c-9ba1-c4acef367333
sdd    
└─sdd1 6fcd4311-861f-4b1c-9ba1-c4acef367333

i wanted test if nixos-generate-config would produce different hardware-configuration.nix files
this was tesed with a live usb

nixos-generate-config --root /mnt
cat /mnt/etc/nixos/hardware-configuration.nix

  fileSystems."/" =
    { device = "/dev/sda2";
      fsType = "btrfs";
      options = [ "subvol=root" ];
    };

  fileSystems."/home" =
    { device = "/dev/sda2";
      fsType = "btrfs";
      options = [ "subvol=home" ];
    };

  fileSystems."/nix" =
    { device = "/dev/sda2";
      fsType = "btrfs";
      options = [ "subvol=nix" ];
    };
reboot
nixos-generate-config --root /mnt
cat /mnt/etc/nixos/hardware-configuration.nix

  fileSystems."/" =
    { device = "/dev/disk/by-uuid/6fcd4311-861f-4b1c-9ba1-c4acef367333";
      fsType = "btrfs";
      options = [ "subvol=root" ];
    };

  fileSystems."/home" =
    { device = "/dev/disk/by-uuid/6fcd4311-861f-4b1c-9ba1-c4acef367333";
      fsType = "btrfs";
      options = [ "subvol=home" ];
    };

  fileSystems."/nix" =
    { device = "/dev/disk/by-uuid/6fcd4311-861f-4b1c-9ba1-c4acef367333";
      fsType = "btrfs";
      options = [ "subvol=nix" ];
    };

my fear is that if btrfs volumes are not mounted with uuid system-d can randomly swap mount points on drives and could lead to what i experienced today