I am batman

This commit is contained in:
2026-07-10 20:07:29 -04:00
commit 4aac54bff6
175 changed files with 18136 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
{ pkgs, ... }:
let
blackarchISO = "https://blackarch.org/blackarch-linux-live-2023.12.01-x86_64.iso"; # Change URL if outdated
vmStorage = "/var/lib/libvirt/images/blackarch.qcow2"; # Change this path if needed
in
pkgs.stdenv.mkDerivation {
name = "blackarch-vm";
buildInputs = [ pkgs.qemu ];
unpackPhase = "true"; # No unpacking needed
installPhase = ''
echo "Creating BlackArch VM disk..."
qemu-img create -f qcow2 ${vmStorage} 50G
echo "BlackArch VM disk created at ${vmStorage}"
'';
meta.description = "BlackArch Linux VM installation";
}

View File

@@ -0,0 +1,6 @@
{
imports = [
./vm.nix
./blackarch.nix
];
}

View File

@@ -0,0 +1,37 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
qemu
libvirt
uefi-run
lxc
swtpm
bottles
dosfstools
virt-manager
virt-viewer
dnsmasq
bridge-utils
ebtables
iptables
];
virtualisation = {
libvirtd = {
enable = true;
qemu.runAsRoot = false;
};
};
users.groups.libvirtd.members = [ "cody" ]; # Replace "cody" with your username
systemd.services.libvirtd.wantedBy = [ "multi-user.target" ];
networking.firewall.allowedTCPPorts = [ 5900 ]; # VNC for VM access
services.udev.packages = [ pkgs.qemu_kvm ];
nixpkgs.config.allowUnfree = true;
}