Compare commits
2 Commits
a512d9bc06
...
add-liveus
| 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,31 +80,14 @@
|
|||||||
extraGroups = [ "wheel" "networkmanager" "audio" "video" ];
|
extraGroups = [ "wheel" "networkmanager" "audio" "video" ];
|
||||||
password = "nixos"; # Simple password for live environment
|
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
|
# ISO customization
|
||||||
isoImage = {
|
isoImage = {
|
||||||
compressImage = true;
|
|
||||||
volumeID = "NIXOS-LIVE";
|
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
|
# Enable some useful services
|
||||||
services.udisks2.enable = true; # For mounting USB drives
|
services.udisks2.enable = true; # For mounting USB drives
|
||||||
programs.fish.enable = true;
|
|
||||||
|
|
||||||
# Hardware support
|
# Hardware support
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableAllFirmware = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user