Compare commits

...

2 Commits

Author SHA1 Message Date
8b676203e7 [live-usb] Add a build script 2025-07-29 12:15:36 -07:00
beeb7acefd [live-usb] Clean up the configuration 2025-07-29 12:15:25 -07:00
2 changed files with 20 additions and 18 deletions

19
build-liveusb.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Build Live USB ISO from flake configuration
# Creates an uncompressed ISO suitable for Ventoy and other USB boot tools
set -e
echo "Building Live USB ISO..."
nix build .#nixosConfigurations.live-usb.config.system.build.isoImage --show-trace
if [ -f "./result/iso/"*.iso ]; then
iso_file=$(ls ./result/iso/*.iso)
echo "✅ Build complete!"
echo "📁 ISO location: $iso_file"
echo "💾 Ready for Ventoy or dd to USB"
else
echo "❌ Build failed - no ISO file found"
exit 1
fi

View File

@@ -80,32 +80,15 @@
extraGroups = [ "wheel" "networkmanager" "audio" "video" ];
password = "nixos"; # Simple password for live environment
};
users.users.root.password = "nixos";
# Enable flakes and new nix command in live environment
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Copy this flake to the live system for easy access
system.extraDependencies = [ pkgs.git ];
# ISO customization
isoImage = {
compressImage = true;
volumeID = "NIXOS-LIVE";
};
# Helpful aliases and environment
environment.shellAliases = {
ll = "ls -la";
la = "ls -la";
rebuild = "sudo nixos-rebuild switch --flake";
install-nixos = "sudo nixos-install --flake";
};
# Enable some useful services
services.udisks2.enable = true; # For mounting USB drives
programs.fish.enable = true;
# Hardware support
hardware.enableAllFirmware = true;
hardware.enableRedistributableFirmware = true;