# Build and run VM
nix build .#nixosConfigurations.mac-mini-01.config.system.build.vm
./result/bin/run-nixos-vm
# Build QCOW2 image
nix build .#nixosConfigurations.mac-mini-01.config.system.build.qcow2
# Sanity checks
nix eval .#nixosConfigurations.mac-mini-01.config.environment.systemPackagesYou can test any NixOS host profile in a sandboxed VM without touching your real machine.
This works with any host under nixosConfigurations.<hostname> in your flake.
- Build a QEMU VM from profile
# From repo root
nix build .#nixosConfigurations.mac-mini-01.config.system.build.vm
# Run the generated VM
./result/bin/run-nixos-vm🔹 Boots a VM with the exact mac-mini-01 config.
Great for testing packages, services, and systemd units.
- Build a QCOW2 image
nix build .#nixosConfigurations.mac-mini-01.config.system.build.qcow2Output: ./result/nixos.qcow2
Use with:
qemu-system-x86_64 -m 2048 -drive file=./result/nixos.qcow2(or import into virt-manager).
- Quick sanity checks
See what’s in your profile without booting:
# List packages
nix eval .#nixosConfigurations.mac-mini-01.config.environment.systemPackages
# Check enabled services
nix eval .#nixosConfigurations.mac-mini-01.config.systemd.services --json | jq .- Notes
- The VM runs inside QEMU, so hardware-specific configs (e.g. USB passthrough, GPU drivers) won’t be fully reflected.
- For networking in the VM, NixOS uses user-mode QEMU networking by default.
- Use this workflow to verify builds, test configs, or debug before a real deployment.
A repository for diligently handcrafted (or blatantly copied, in the spirit of open-source) config files and nifty scripts for my systems.
Warning: If you want to give these dotfiles a try, you should first fork this repository, review the code, and remove what you don’t want or need. Don’t blindly use my settings unless you want to have EXACTLY what I do. Use at your own risk!
dotfiles are managed and installed with dotbot. To install these dotfiles simplly clone this repository and run the installation script.
$ git clone https://github.com/ProfeC/dotfiles.git ~/.dotfiles
$ ~/.dotfiles/install [config file(s)] # chose correct config file for the distribution you're updating$ ~/.dotfiles/install macosInstall Xcode and Xcode Tools from the AppStore. Once that has completed,
$ ~/.dotfiles/install macos macos-new$ ~/.dotfiles/install linux$ ~/.dotfiles/install linux archThanks to ALL of the people with dotfiles out there that I've looked at to configure my system(s).
Inspired by this article and Dotbot. You can fork Anish Athalye's template if you'd like or take a look at his dotfiles.
The following have been extensivley used:
- Anish Athalye and his:
- Mathias Bynens and his:
- Samuel Walladge and his:
- dotfiles repository
- parts of his README.
Content can be assumed to be original unless stated otherwise. All third party content is copyright their respective authors and bound by their original licenses.
Attempts have been made to identify third party content within the repository, with sources and attribution given where necessary. Please contact me if any issues are discovered.