Compare commits
2 Commits
a512d9bc06
...
8b676203e7
| Author | SHA1 | Date | |
|---|---|---|---|
| 8b676203e7 | |||
| beeb7acefd |
19
build-liveusb.sh
Executable file
19
build-liveusb.sh
Executable 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
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user