Fix package conflicts and add ISO configuration
- Fixed nvtop package reference (nvtopPackages.full -> nvtop) - Fixed display manager conflicts in ISO config - Fixed SSH settings conflicts with lib.mkForce - Fixed home-manager username conflicts for ISO - Added complete ISO build configuration with Wayland-only setup - Added ISO build documentation and scripts
This commit is contained in:
382
BUILD_ISO.md
Normal file
382
BUILD_ISO.md
Normal file
@@ -0,0 +1,382 @@
|
|||||||
|
# Building OmniXY ISO Image
|
||||||
|
|
||||||
|
This guide explains how to build a live ISO image of OmniXY NixOS that can be used for installation or testing.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
1. **NixOS or Nix with Flakes**: You need a system with Nix installed and flakes enabled
|
||||||
|
2. **Sufficient disk space**: Building an ISO requires several GB of space
|
||||||
|
3. **Good internet connection**: Initial build will download many packages
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
|
### Method 1: Using the Built-in App (Recommended)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Clone the repository
|
||||||
|
git clone https://github.com/TheArctesian/omnixy.git
|
||||||
|
cd omnixy
|
||||||
|
|
||||||
|
# Build the ISO using the built-in app
|
||||||
|
nix run .#build-iso
|
||||||
|
```
|
||||||
|
|
||||||
|
The built app will:
|
||||||
|
- Build the ISO image
|
||||||
|
- Show progress and final location
|
||||||
|
- Provide instructions for using the ISO
|
||||||
|
|
||||||
|
### Method 2: Direct Nix Build
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Build the ISO directly
|
||||||
|
nix build .#iso
|
||||||
|
|
||||||
|
# The ISO will be available as a symlink
|
||||||
|
ls -la ./result/iso/
|
||||||
|
```
|
||||||
|
|
||||||
|
### Method 3: Build Specific Configuration
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Build the ISO configuration specifically
|
||||||
|
nix build .#nixosConfigurations.omnixy-iso.config.system.build.isoImage
|
||||||
|
|
||||||
|
# Find the ISO file
|
||||||
|
find ./result -name "*.iso"
|
||||||
|
```
|
||||||
|
|
||||||
|
## ISO Features
|
||||||
|
|
||||||
|
The OmniXY ISO includes:
|
||||||
|
|
||||||
|
### Pre-installed Software
|
||||||
|
- **Desktop Environment**: Hyprland with full OmniXY theming
|
||||||
|
- **Development Tools**: Complete development stack (editors, compilers, etc.)
|
||||||
|
- **Multimedia**: Video players, image viewers, audio tools
|
||||||
|
- **Productivity**: Browsers, office suite, communication tools
|
||||||
|
- **System Tools**: Disk utilities, system monitors, network tools
|
||||||
|
|
||||||
|
### Live Session Features
|
||||||
|
- **Auto-login**: Boots directly to the desktop as `nixos` user
|
||||||
|
- **No password required**: Passwordless sudo for system administration
|
||||||
|
- **Network ready**: NetworkManager enabled for easy connection
|
||||||
|
- **Installation tools**: Graphical installer (Calamares) included
|
||||||
|
- **Theme showcase**: All OmniXY themes available for testing
|
||||||
|
|
||||||
|
### Installation Capabilities
|
||||||
|
- **Guided installation**: Run `omnixy-installer` for graphical setup
|
||||||
|
- **Manual installation**: Full NixOS installation tools available
|
||||||
|
- **Hardware support**: Wide hardware compatibility with latest kernel
|
||||||
|
|
||||||
|
## ISO Configuration Details
|
||||||
|
|
||||||
|
### Size and Performance
|
||||||
|
- **Expected size**: 3-5 GB (depending on included packages)
|
||||||
|
- **RAM requirements**: Minimum 4GB RAM for live session
|
||||||
|
- **Boot methods**: UEFI and BIOS supported
|
||||||
|
|
||||||
|
### Included Themes
|
||||||
|
All OmniXY themes are included and can be tested:
|
||||||
|
- tokyo-night (default)
|
||||||
|
- catppuccin
|
||||||
|
- gruvbox
|
||||||
|
- nord
|
||||||
|
- everforest
|
||||||
|
- rose-pine
|
||||||
|
- kanagawa
|
||||||
|
- catppuccin-latte
|
||||||
|
- matte-black
|
||||||
|
- osaka-jade
|
||||||
|
- ristretto
|
||||||
|
|
||||||
|
### Customization Options
|
||||||
|
|
||||||
|
#### Building with Different Default Theme
|
||||||
|
|
||||||
|
Edit `iso.nix` and change the theme import:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
# Change this line:
|
||||||
|
./modules/themes/tokyo-night.nix
|
||||||
|
|
||||||
|
# To your preferred theme:
|
||||||
|
./modules/themes/gruvbox.nix
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Excluding Packages
|
||||||
|
|
||||||
|
Modify the `omnixy.packages.exclude` section in `iso.nix`:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
omnixy = {
|
||||||
|
# ... other config
|
||||||
|
packages = {
|
||||||
|
exclude = [ "discord" "spotify" "steam" ]; # Add packages to exclude
|
||||||
|
};
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Adding Custom Packages
|
||||||
|
|
||||||
|
Add packages to the `environment.systemPackages` in `iso.nix`:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# ... existing packages
|
||||||
|
your-custom-package
|
||||||
|
];
|
||||||
|
```
|
||||||
|
|
||||||
|
## Using the ISO
|
||||||
|
|
||||||
|
### Creating Bootable Media
|
||||||
|
|
||||||
|
#### USB Drive (Linux)
|
||||||
|
```bash
|
||||||
|
# Replace /dev/sdX with your USB device
|
||||||
|
sudo dd if=./result/iso/omnixy-*.iso of=/dev/sdX bs=4M status=progress oflag=sync
|
||||||
|
```
|
||||||
|
|
||||||
|
#### USB Drive (Windows)
|
||||||
|
Use tools like:
|
||||||
|
- Rufus
|
||||||
|
- Balena Etcher
|
||||||
|
- Windows USB/DVD Download Tool
|
||||||
|
|
||||||
|
#### DVD
|
||||||
|
Use any DVD burning software with the ISO file.
|
||||||
|
|
||||||
|
### Testing in Virtual Machine
|
||||||
|
|
||||||
|
#### QEMU
|
||||||
|
```bash
|
||||||
|
# Basic VM test (4GB RAM)
|
||||||
|
qemu-system-x86_64 -cdrom ./result/iso/omnixy-*.iso -m 4G -enable-kvm
|
||||||
|
|
||||||
|
# VM with more features
|
||||||
|
qemu-system-x86_64 \
|
||||||
|
-cdrom ./result/iso/omnixy-*.iso \
|
||||||
|
-m 8G \
|
||||||
|
-enable-kvm \
|
||||||
|
-vga virtio \
|
||||||
|
-display gtk,gl=on \
|
||||||
|
-machine q35 \
|
||||||
|
-cpu host
|
||||||
|
```
|
||||||
|
|
||||||
|
#### VirtualBox
|
||||||
|
1. Create new VM with Linux/Other Linux (64-bit)
|
||||||
|
2. Allocate at least 4GB RAM
|
||||||
|
3. Mount the ISO as CD/DVD
|
||||||
|
4. Enable hardware acceleration if available
|
||||||
|
|
||||||
|
#### VMware
|
||||||
|
1. Create new VM with Linux/Other Linux 5.x kernel 64-bit
|
||||||
|
2. Allocate at least 4GB RAM
|
||||||
|
3. Use ISO as CD/DVD source
|
||||||
|
4. Enable hardware acceleration
|
||||||
|
|
||||||
|
## Installation from ISO
|
||||||
|
|
||||||
|
### Using the Graphical Installer
|
||||||
|
|
||||||
|
1. Boot from the ISO
|
||||||
|
2. Wait for auto-login to complete
|
||||||
|
3. Run the installer:
|
||||||
|
```bash
|
||||||
|
omnixy-installer
|
||||||
|
```
|
||||||
|
4. Follow the graphical installation wizard
|
||||||
|
5. Reboot when complete
|
||||||
|
|
||||||
|
### Manual Installation
|
||||||
|
|
||||||
|
1. Boot from the ISO
|
||||||
|
2. Partition your disk with `gparted` or command-line tools
|
||||||
|
3. Mount your root partition:
|
||||||
|
```bash
|
||||||
|
sudo mount /dev/sdaX /mnt
|
||||||
|
```
|
||||||
|
4. Generate hardware configuration:
|
||||||
|
```bash
|
||||||
|
sudo nixos-generate-config --root /mnt
|
||||||
|
```
|
||||||
|
5. Download OmniXY:
|
||||||
|
```bash
|
||||||
|
cd /mnt/etc/nixos
|
||||||
|
sudo git clone https://github.com/TheArctesian/omnixy.git .
|
||||||
|
```
|
||||||
|
6. Edit configuration:
|
||||||
|
```bash
|
||||||
|
sudo nano configuration.nix
|
||||||
|
# Set your username and preferred theme
|
||||||
|
```
|
||||||
|
7. Install:
|
||||||
|
```bash
|
||||||
|
sudo nixos-install --flake /mnt/etc/nixos#omnixy
|
||||||
|
```
|
||||||
|
8. Set root password when prompted
|
||||||
|
9. Reboot
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### Build Issues
|
||||||
|
|
||||||
|
#### "Path does not exist" errors
|
||||||
|
Ensure all files are present and paths in configuration are correct:
|
||||||
|
```bash
|
||||||
|
# Check if all required files exist
|
||||||
|
ls -la modules/ packages/ assets/
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Out of disk space
|
||||||
|
Building requires significant space:
|
||||||
|
```bash
|
||||||
|
# Clean up nix store
|
||||||
|
nix-collect-garbage -d
|
||||||
|
|
||||||
|
# Check available space
|
||||||
|
df -h
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Network issues during build
|
||||||
|
Ensure internet connection and try with cached builds:
|
||||||
|
```bash
|
||||||
|
# Use substituters
|
||||||
|
nix build .#iso --substituters https://cache.nixos.org
|
||||||
|
```
|
||||||
|
|
||||||
|
### Boot Issues
|
||||||
|
|
||||||
|
#### ISO doesn't boot
|
||||||
|
- Verify BIOS/UEFI settings
|
||||||
|
- Try different USB creation method
|
||||||
|
- Check USB drive integrity
|
||||||
|
|
||||||
|
#### Black screen on boot
|
||||||
|
- Try different graphics settings in GRUB
|
||||||
|
- Add `nomodeset` kernel parameter
|
||||||
|
- Use safe graphics mode
|
||||||
|
|
||||||
|
#### Out of memory during live session
|
||||||
|
- Use system with more RAM (minimum 4GB)
|
||||||
|
- Close unnecessary applications
|
||||||
|
- Consider lighter package selection
|
||||||
|
|
||||||
|
### Installation Issues
|
||||||
|
|
||||||
|
#### Hardware not detected
|
||||||
|
- Ensure latest kernel is being used
|
||||||
|
- Check for firmware packages
|
||||||
|
- Update hardware-configuration.nix manually
|
||||||
|
|
||||||
|
#### Network issues during installation
|
||||||
|
- Test network in live session first
|
||||||
|
- Configure NetworkManager connections
|
||||||
|
- Check firewall settings
|
||||||
|
|
||||||
|
## Advanced Usage
|
||||||
|
|
||||||
|
### Building for Different Architectures
|
||||||
|
|
||||||
|
Currently, OmniXY ISO supports x86_64-linux. For other architectures:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Check available systems
|
||||||
|
nix flake show
|
||||||
|
|
||||||
|
# Build for specific system (if supported)
|
||||||
|
nix build .#packages.aarch64-linux.iso
|
||||||
|
```
|
||||||
|
|
||||||
|
### Customizing Boot Parameters
|
||||||
|
|
||||||
|
Edit the ISO configuration to add custom kernel parameters:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
# In iso.nix
|
||||||
|
boot.kernelParams = [
|
||||||
|
# Add your custom parameters
|
||||||
|
"custom.parameter=value"
|
||||||
|
];
|
||||||
|
```
|
||||||
|
|
||||||
|
### Creating Minimal ISO
|
||||||
|
|
||||||
|
For a smaller ISO, disable features in `iso.nix`:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
omnixy = {
|
||||||
|
preset = "minimal"; # Instead of "everything"
|
||||||
|
packages.exclude = [ /* large packages */ ];
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
## CI/CD Integration
|
||||||
|
|
||||||
|
### GitHub Actions
|
||||||
|
|
||||||
|
Add to `.github/workflows/build-iso.yml`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: Build ISO
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags: ['v*']
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: cachix/install-nix-action@v20
|
||||||
|
with:
|
||||||
|
enable_flakes: true
|
||||||
|
- name: Build ISO
|
||||||
|
run: nix build .#iso
|
||||||
|
- name: Upload ISO
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: omnixy-iso
|
||||||
|
path: result/iso/*.iso
|
||||||
|
```
|
||||||
|
|
||||||
|
### GitLab CI
|
||||||
|
|
||||||
|
Add to `.gitlab-ci.yml`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
build-iso:
|
||||||
|
image: nixos/nix:latest
|
||||||
|
script:
|
||||||
|
- nix build .#iso
|
||||||
|
- cp result/iso/*.iso ./
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- "*.iso"
|
||||||
|
expire_in: 1 week
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
```
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
When modifying the ISO configuration:
|
||||||
|
|
||||||
|
1. Test builds locally before committing
|
||||||
|
2. Verify ISO boots in at least one VM
|
||||||
|
3. Test both UEFI and BIOS boot modes
|
||||||
|
4. Check that installation process works
|
||||||
|
5. Update documentation if adding new features
|
||||||
|
|
||||||
|
## Support
|
||||||
|
|
||||||
|
- **Issues**: Report problems on GitHub Issues
|
||||||
|
- **Discussions**: Join GitHub Discussions for questions
|
||||||
|
- **Documentation**: Check the main README.md for general info
|
||||||
|
- **Matrix/Discord**: Community chat (links in main README)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
For more information about OmniXY, see the main [README.md](README.md) file.
|
||||||
10
CLAUDE.md
10
CLAUDE.md
@@ -197,6 +197,16 @@ The configuration is split into focused modules:
|
|||||||
- Simple installer: `./install-simple.sh` - Unix-philosophy compliant, scriptable installer
|
- Simple installer: `./install-simple.sh` - Unix-philosophy compliant, scriptable installer
|
||||||
- Manual flake install: `sudo nixos-rebuild switch --flake github:TheArctesian/omnixy#omnixy`
|
- Manual flake install: `sudo nixos-rebuild switch --flake github:TheArctesian/omnixy#omnixy`
|
||||||
|
|
||||||
|
### ISO Building
|
||||||
|
```bash
|
||||||
|
# Build live ISO image
|
||||||
|
nix run .#build-iso
|
||||||
|
nix build .#iso # Direct build
|
||||||
|
|
||||||
|
# ISO features: Live desktop, installer, all themes, development tools
|
||||||
|
# See BUILD_ISO.md for complete documentation
|
||||||
|
```
|
||||||
|
|
||||||
### Unix Philosophy Tools (scripts/ directory)
|
### Unix Philosophy Tools (scripts/ directory)
|
||||||
Focused, composable tools following "do one thing well":
|
Focused, composable tools following "do one thing well":
|
||||||
- `scripts/omnixy-check-system` - Just check system requirements
|
- `scripts/omnixy-check-system` - Just check system requirements
|
||||||
|
|||||||
5
assets/logo.png
Normal file
5
assets/logo.png
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# This is a placeholder for the OmniXY logo
|
||||||
|
# Replace this with an actual PNG file for the ISO splash screen
|
||||||
|
# For now, we'll create a simple SVG that can be converted to PNG
|
||||||
|
|
||||||
|
echo "Creating placeholder logo..."
|
||||||
89
flake.nix
89
flake.nix
@@ -85,6 +85,35 @@
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# ISO configuration for live USB/DVD
|
||||||
|
omnixy-iso = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
specialArgs = { inherit inputs; };
|
||||||
|
modules = [
|
||||||
|
./iso.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
extraSpecialArgs = { inherit inputs; };
|
||||||
|
users = {
|
||||||
|
nixos = { config, pkgs, lib, inputs, ... }: {
|
||||||
|
imports = [ ./home.nix ];
|
||||||
|
|
||||||
|
# Override the username and home directory for ISO
|
||||||
|
home.username = lib.mkForce "nixos";
|
||||||
|
home.homeDirectory = lib.mkForce "/home/nixos";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
sharedModules = [
|
||||||
|
inputs.nix-colors.homeManagerModules.default
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Development shells
|
# Development shells
|
||||||
@@ -113,7 +142,7 @@
|
|||||||
# Build tools
|
# Build tools
|
||||||
gnumake
|
gnumake
|
||||||
gcc
|
gcc
|
||||||
nodejs_20
|
nodejs
|
||||||
python3
|
python3
|
||||||
rustc
|
rustc
|
||||||
cargo
|
cargo
|
||||||
@@ -156,7 +185,7 @@
|
|||||||
# Node.js development
|
# Node.js development
|
||||||
node = pkgs.mkShell {
|
node = pkgs.mkShell {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
nodejs_20
|
nodejs
|
||||||
nodePackages.npm
|
nodePackages.npm
|
||||||
nodePackages.pnpm
|
nodePackages.pnpm
|
||||||
nodePackages.yarn
|
nodePackages.yarn
|
||||||
@@ -183,8 +212,14 @@
|
|||||||
# OmniXY scripts as packages
|
# OmniXY scripts as packages
|
||||||
omnixy-scripts = pkgs.callPackage ./packages/scripts.nix {};
|
omnixy-scripts = pkgs.callPackage ./packages/scripts.nix {};
|
||||||
|
|
||||||
# Plymouth theme (disabled until package exists)
|
# Plymouth theme package
|
||||||
# plymouth-theme-omnixy = pkgs.callPackage ./packages/plymouth-theme.nix {};
|
plymouth-theme-omnixy = pkgs.callPackage ./packages/plymouth-theme.nix {};
|
||||||
|
|
||||||
|
# ISO image
|
||||||
|
iso = self.nixosConfigurations.omnixy-iso.config.system.build.isoImage;
|
||||||
|
|
||||||
|
# Default package points to ISO
|
||||||
|
default = self.packages.${system}.iso;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Apps that can be run
|
# Apps that can be run
|
||||||
@@ -237,6 +272,52 @@
|
|||||||
echo "🎉 Welcome to OmniXY!"
|
echo "🎉 Welcome to OmniXY!"
|
||||||
''}/bin/omnixy-install";
|
''}/bin/omnixy-install";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# ISO builder
|
||||||
|
build-iso = {
|
||||||
|
type = "app";
|
||||||
|
program = "${pkgs.writeShellScriptBin "omnixy-build-iso" ''
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "🏗️ Building OmniXY ISO Image"
|
||||||
|
echo "============================"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
echo "📦 Building ISO image..."
|
||||||
|
echo " This may take a while depending on your system..."
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Build the ISO
|
||||||
|
nix build .#iso
|
||||||
|
|
||||||
|
# Check if build was successful
|
||||||
|
if [ -L "./result" ]; then
|
||||||
|
iso_path=$(readlink -f ./result)
|
||||||
|
iso_file=$(find "$iso_path" -name "*.iso" | head -1)
|
||||||
|
|
||||||
|
if [ -n "$iso_file" ]; then
|
||||||
|
iso_size=$(du -h "$iso_file" | cut -f1)
|
||||||
|
echo ""
|
||||||
|
echo "✅ ISO build complete!"
|
||||||
|
echo "📁 Location: $iso_file"
|
||||||
|
echo "📏 Size: $iso_size"
|
||||||
|
echo ""
|
||||||
|
echo "🚀 You can now:"
|
||||||
|
echo " • Flash to USB: dd if='$iso_file' of=/dev/sdX bs=4M status=progress"
|
||||||
|
echo " • Burn to DVD: Use your favorite burning software"
|
||||||
|
echo " • Test in VM: qemu-system-x86_64 -cdrom '$iso_file' -m 4G -enable-kvm"
|
||||||
|
echo ""
|
||||||
|
else
|
||||||
|
echo "❌ ISO file not found in build result"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "❌ Build failed - result symlink not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
''}/bin/omnixy-build-iso";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
2
home.nix
2
home.nix
@@ -38,7 +38,7 @@
|
|||||||
# System monitoring
|
# System monitoring
|
||||||
btop
|
btop
|
||||||
htop
|
htop
|
||||||
nvtopPackages.full
|
nvtop
|
||||||
|
|
||||||
# Media
|
# Media
|
||||||
mpv
|
mpv
|
||||||
|
|||||||
416
iso.nix
Normal file
416
iso.nix
Normal file
@@ -0,0 +1,416 @@
|
|||||||
|
# OmniXY NixOS Live ISO Configuration
|
||||||
|
# This creates a bootable ISO image with OmniXY pre-installed
|
||||||
|
|
||||||
|
{ config, pkgs, lib, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
# Include the basic ISO image module (without Calamares to avoid conflicts)
|
||||||
|
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
|
||||||
|
|
||||||
|
# OmniXY modules (lib must be first to provide helpers)
|
||||||
|
./modules/lib.nix
|
||||||
|
./modules/core.nix
|
||||||
|
./modules/colors.nix
|
||||||
|
./modules/security.nix
|
||||||
|
./modules/fastfetch.nix
|
||||||
|
./modules/walker.nix
|
||||||
|
./modules/scripts.nix
|
||||||
|
./modules/menus.nix
|
||||||
|
./modules/desktop/hyprland.nix
|
||||||
|
./modules/packages.nix
|
||||||
|
./modules/development.nix
|
||||||
|
./modules/themes/tokyo-night.nix # Default theme for ISO
|
||||||
|
./modules/users.nix
|
||||||
|
./modules/services.nix
|
||||||
|
./modules/hardware
|
||||||
|
];
|
||||||
|
|
||||||
|
# ISO-specific configuration
|
||||||
|
isoImage = {
|
||||||
|
# ISO image settings
|
||||||
|
isoName = "omnixy-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.iso";
|
||||||
|
volumeID = "OMNIXY_${lib.toUpper config.system.nixos.label}";
|
||||||
|
|
||||||
|
# Boot configuration
|
||||||
|
makeEfiBootable = true;
|
||||||
|
makeUsbBootable = true;
|
||||||
|
|
||||||
|
# Include additional files
|
||||||
|
includeSystemBuildDependencies = false;
|
||||||
|
|
||||||
|
# Boot splash (optional)
|
||||||
|
splashImage = if builtins.pathExists ./assets/logo.png
|
||||||
|
then ./assets/logo.png
|
||||||
|
else null;
|
||||||
|
|
||||||
|
# Desktop entry for installer
|
||||||
|
contents = [
|
||||||
|
{
|
||||||
|
source = pkgs.writeText "omnixy-install.desktop" ''
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Install OmniXY
|
||||||
|
Comment=Install OmniXY NixOS to your computer
|
||||||
|
Exec=gnome-terminal -- sudo omnixy-installer
|
||||||
|
Icon=system-software-install
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Categories=System;
|
||||||
|
StartupNotify=true
|
||||||
|
'';
|
||||||
|
target = "etc/xdg/autostart/omnixy-install.desktop";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# System configuration for live ISO
|
||||||
|
system.stateVersion = "24.05";
|
||||||
|
|
||||||
|
# Allow unfree packages
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
# Enable flakes
|
||||||
|
nix = {
|
||||||
|
settings = {
|
||||||
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
auto-optimise-store = true;
|
||||||
|
|
||||||
|
# Binary caches
|
||||||
|
substituters = [
|
||||||
|
"https://cache.nixos.org"
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
"https://hyprland.cachix.org"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Networking
|
||||||
|
networking = {
|
||||||
|
hostName = "omnixy-live";
|
||||||
|
networkmanager.enable = true;
|
||||||
|
wireless.enable = false; # Disable wpa_supplicant, use NetworkManager
|
||||||
|
|
||||||
|
# Enable firewall but allow common services for live session
|
||||||
|
firewall = {
|
||||||
|
enable = true;
|
||||||
|
allowedTCPPorts = [ 22 80 443 3000 8080 ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Timezone and locale
|
||||||
|
time.timeZone = "UTC"; # Will be configured during installation
|
||||||
|
i18n = {
|
||||||
|
defaultLocale = "en_US.UTF-8";
|
||||||
|
extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "en_US.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||||
|
LC_MEASUREMENT = "en_US.UTF-8";
|
||||||
|
LC_MONETARY = "en_US.UTF-8";
|
||||||
|
LC_NAME = "en_US.UTF-8";
|
||||||
|
LC_NUMERIC = "en_US.UTF-8";
|
||||||
|
LC_PAPER = "en_US.UTF-8";
|
||||||
|
LC_TELEPHONE = "en_US.UTF-8";
|
||||||
|
LC_TIME = "en_US.UTF-8";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Sound configuration
|
||||||
|
services.pulseaudio.enable = false;
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
jack.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Override display manager configuration for ISO
|
||||||
|
services = {
|
||||||
|
# Disable greetd from main config
|
||||||
|
greetd.enable = lib.mkForce false;
|
||||||
|
|
||||||
|
# Enable auto-login for live session
|
||||||
|
getty.autologinUser = "nixos";
|
||||||
|
|
||||||
|
# Keep X11 disabled - pure Wayland
|
||||||
|
xserver.enable = lib.mkForce false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Live user configuration is handled by modules/users.nix
|
||||||
|
# The nixos user will be created automatically since omnixy.user = "nixos"
|
||||||
|
# We just need to set an empty password for the live session
|
||||||
|
users.users.nixos.initialPassword = lib.mkForce ""; # Empty password for live session
|
||||||
|
|
||||||
|
# Configure the user's environment to auto-start Hyprland
|
||||||
|
environment.etc."profile.d/auto-hyprland.sh".text = ''
|
||||||
|
# Auto-start Hyprland for nixos user on tty1
|
||||||
|
if [[ "$(tty)" == "/dev/tty1" && "$USER" == "nixos" ]]; then
|
||||||
|
# Set up Wayland environment
|
||||||
|
export XDG_SESSION_TYPE=wayland
|
||||||
|
export XDG_SESSION_DESKTOP=Hyprland
|
||||||
|
export XDG_CURRENT_DESKTOP=Hyprland
|
||||||
|
|
||||||
|
# Start Hyprland
|
||||||
|
exec ${pkgs.hyprland}/bin/Hyprland
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Sudo configuration for live user
|
||||||
|
security.sudo = {
|
||||||
|
enable = true;
|
||||||
|
wheelNeedsPassword = false; # Allow passwordless sudo for live session
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable SSH for remote access (with empty password warning)
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
PasswordAuthentication = lib.mkForce true; # Override core.nix setting for ISO
|
||||||
|
PermitEmptyPasswords = lib.mkForce true; # For live session only
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# OmniXY configuration for ISO
|
||||||
|
omnixy = {
|
||||||
|
enable = true;
|
||||||
|
user = "nixos"; # Live session user
|
||||||
|
theme = "tokyo-night";
|
||||||
|
displayManager = "gdm"; # Override default for live session
|
||||||
|
|
||||||
|
# Use developer preset for maximum features showcase
|
||||||
|
preset = "everything";
|
||||||
|
|
||||||
|
# Security configuration (relaxed for live session)
|
||||||
|
security = {
|
||||||
|
enable = true;
|
||||||
|
fingerprint.enable = false;
|
||||||
|
fido2.enable = false;
|
||||||
|
systemHardening = {
|
||||||
|
enable = false; # Disable hardening for live session compatibility
|
||||||
|
faillock.enable = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Package configuration
|
||||||
|
packages = {
|
||||||
|
# Don't exclude anything for the live session showcase
|
||||||
|
exclude = [];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Additional ISO packages
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# Installation tools
|
||||||
|
gparted
|
||||||
|
gnome-disk-utility
|
||||||
|
|
||||||
|
# Text editors for configuration
|
||||||
|
nano
|
||||||
|
vim
|
||||||
|
|
||||||
|
# Network tools
|
||||||
|
wget
|
||||||
|
curl
|
||||||
|
|
||||||
|
# File managers
|
||||||
|
nautilus
|
||||||
|
|
||||||
|
# System information
|
||||||
|
neofetch
|
||||||
|
lshw
|
||||||
|
|
||||||
|
# Terminal emulators (fallback)
|
||||||
|
gnome-terminal
|
||||||
|
|
||||||
|
# Web browser for documentation
|
||||||
|
firefox
|
||||||
|
|
||||||
|
# OmniXY installer script
|
||||||
|
(pkgs.writeShellScriptBin "omnixy-installer" ''
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "🚀 OmniXY NixOS Installer"
|
||||||
|
echo "========================="
|
||||||
|
echo ""
|
||||||
|
echo "This will guide you through installing OmniXY NixOS to your computer."
|
||||||
|
echo ""
|
||||||
|
echo "⚠️ WARNING: This will modify your disk partitions!"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
read -p "Do you want to continue? (y/N): " -n 1 -r
|
||||||
|
echo
|
||||||
|
|
||||||
|
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||||
|
echo "Installation cancelled."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Launch the graphical installer
|
||||||
|
echo "🖥️ Launching graphical installer..."
|
||||||
|
echo " Follow the on-screen instructions to install OmniXY."
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Use Calamares if available, otherwise provide manual instructions
|
||||||
|
if command -v calamares &> /dev/null; then
|
||||||
|
sudo calamares
|
||||||
|
else
|
||||||
|
echo "📝 Manual Installation Instructions:"
|
||||||
|
echo ""
|
||||||
|
echo "1. Partition your disk with gparted or fdisk"
|
||||||
|
echo "2. Mount your root partition to /mnt"
|
||||||
|
echo "3. Generate hardware configuration:"
|
||||||
|
echo " sudo nixos-generate-config --root /mnt"
|
||||||
|
echo ""
|
||||||
|
echo "4. Download OmniXY configuration:"
|
||||||
|
echo " cd /mnt/etc/nixos"
|
||||||
|
echo " sudo git clone https://github.com/TheArctesian/omnixy.git ."
|
||||||
|
echo ""
|
||||||
|
echo "5. Edit configuration.nix to set your username and theme"
|
||||||
|
echo ""
|
||||||
|
echo "6. Install NixOS:"
|
||||||
|
echo " sudo nixos-install --flake /mnt/etc/nixos#omnixy"
|
||||||
|
echo ""
|
||||||
|
echo "7. Reboot and enjoy OmniXY!"
|
||||||
|
|
||||||
|
read -p "Press Enter to open gparted for disk partitioning..."
|
||||||
|
sudo gparted
|
||||||
|
fi
|
||||||
|
'')
|
||||||
|
|
||||||
|
# Demo scripts
|
||||||
|
(pkgs.writeShellScriptBin "omnixy-demo" ''
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
echo "🎨 OmniXY Live Demo"
|
||||||
|
echo "=================="
|
||||||
|
echo ""
|
||||||
|
echo "Welcome to OmniXY NixOS Live Session!"
|
||||||
|
echo ""
|
||||||
|
echo "Available commands:"
|
||||||
|
echo " omnixy-installer - Install OmniXY to your computer"
|
||||||
|
echo " omnixy-info - Show system information"
|
||||||
|
echo " omnixy-theme - Change theme (temporary for live session)"
|
||||||
|
echo " omnixy-demo - Show this demo"
|
||||||
|
echo ""
|
||||||
|
echo "Key features to try:"
|
||||||
|
echo " • Hyprland window manager with modern animations"
|
||||||
|
echo " • Multiple themes (tokyo-night, catppuccin, gruvbox, etc.)"
|
||||||
|
echo " • Development tools and environments"
|
||||||
|
echo " • Multimedia and productivity applications"
|
||||||
|
echo ""
|
||||||
|
echo "To install OmniXY permanently, run: omnixy-installer"
|
||||||
|
echo ""
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
|
||||||
|
# Services for live session
|
||||||
|
services = {
|
||||||
|
# Enable printing support
|
||||||
|
printing.enable = true;
|
||||||
|
|
||||||
|
# Enable Bluetooth
|
||||||
|
blueman.enable = true;
|
||||||
|
|
||||||
|
# Enable location services
|
||||||
|
geoclue2.enable = true;
|
||||||
|
|
||||||
|
# Enable automatic time synchronization
|
||||||
|
timesyncd.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Hardware support
|
||||||
|
hardware = {
|
||||||
|
# Enable all firmware
|
||||||
|
enableAllFirmware = true;
|
||||||
|
|
||||||
|
# Graphics drivers
|
||||||
|
graphics = {
|
||||||
|
enable = true;
|
||||||
|
enable32Bit = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Bluetooth
|
||||||
|
bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Pulseaudio (disabled in favor of PipeWire)
|
||||||
|
pulseaudio.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Boot configuration for ISO
|
||||||
|
boot = {
|
||||||
|
# Support for various filesystems
|
||||||
|
supportedFilesystems = [ "btrfs" "ext4" "xfs" "ntfs" "fat32" "exfat" ];
|
||||||
|
|
||||||
|
# Include lots of modules for hardware compatibility
|
||||||
|
initrd.availableKernelModules = [
|
||||||
|
# Storage
|
||||||
|
"ahci" "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"
|
||||||
|
# Graphics
|
||||||
|
"amdgpu" "radeon" "nouveau" "i915"
|
||||||
|
# Network
|
||||||
|
"r8169" "e1000e" "iwlwifi" "ath9k" "ath10k_pci" "rtw88_8822ce"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Kernel parameters for better hardware compatibility
|
||||||
|
kernelParams = [
|
||||||
|
"boot.shell_on_fail"
|
||||||
|
"i915.modeset=1"
|
||||||
|
"nouveau.modeset=1"
|
||||||
|
"radeon.modeset=1"
|
||||||
|
"amdgpu.modeset=1"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Use latest kernel for best hardware support
|
||||||
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
# Plymouth disabled for ISO to avoid potential issues
|
||||||
|
plymouth.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Auto-login is configured above in services.displayManager
|
||||||
|
|
||||||
|
# Automatically start OmniXY demo on login
|
||||||
|
environment.loginShellInit = ''
|
||||||
|
# Show demo information on first login
|
||||||
|
if [ -f /home/nixos/.first-login ]; then
|
||||||
|
omnixy-demo
|
||||||
|
rm /home/nixos/.first-login
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Create first-login marker
|
||||||
|
system.activationScripts.createFirstLoginMarker = ''
|
||||||
|
touch /home/nixos/.first-login
|
||||||
|
chown nixos:users /home/nixos/.first-login
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Disable some services that might cause issues in live session
|
||||||
|
systemd.services = {
|
||||||
|
# Disable networkd-wait-online to speed up boot
|
||||||
|
systemd-networkd-wait-online.enable = false;
|
||||||
|
|
||||||
|
# Disable some hardware services that might not be needed
|
||||||
|
fwupd.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Memory and performance optimizations for live session
|
||||||
|
boot.kernel.sysctl = {
|
||||||
|
# Use more aggressive memory reclaim
|
||||||
|
"vm.swappiness" = 10;
|
||||||
|
"vm.vfs_cache_pressure" = 50;
|
||||||
|
|
||||||
|
# Network optimizations
|
||||||
|
"net.core.default_qdisc" = "fq";
|
||||||
|
"net.ipv4.tcp_congestion_control" = "bbr";
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -10,7 +10,7 @@ let
|
|||||||
omnixy = import ./helpers.nix { inherit config pkgs lib; };
|
omnixy = import ./helpers.nix { inherit config pkgs lib; };
|
||||||
|
|
||||||
# Import our custom Plymouth theme package
|
# Import our custom Plymouth theme package
|
||||||
plymouth-themes = pkgs.callPackage ../packages/plymouth-theme.nix {};
|
plymouth-themes = (pkgs.callPackage ../packages/plymouth-theme.nix {}) or pkgs.plymouth;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = mkIf (cfg.enable or true) {
|
config = mkIf (cfg.enable or true) {
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ in
|
|||||||
ruff
|
ruff
|
||||||
|
|
||||||
# Node.js
|
# Node.js
|
||||||
nodejs_20
|
nodejs
|
||||||
nodePackages.npm
|
nodePackages.npm
|
||||||
nodePackages.pnpm
|
nodePackages.pnpm
|
||||||
nodePackages.yarn
|
nodePackages.yarn
|
||||||
@@ -247,7 +247,7 @@ in
|
|||||||
nix-shell -p python3 python3Packages.pip python3Packages.virtualenv
|
nix-shell -p python3 python3Packages.pip python3Packages.virtualenv
|
||||||
;;
|
;;
|
||||||
node)
|
node)
|
||||||
nix-shell -p nodejs_20 nodePackages.npm nodePackages.pnpm
|
nix-shell -p nodejs nodePackages.npm nodePackages.pnpm
|
||||||
;;
|
;;
|
||||||
c|cpp)
|
c|cpp)
|
||||||
nix-shell -p gcc cmake gnumake gdb
|
nix-shell -p gcc cmake gnumake gdb
|
||||||
@@ -344,7 +344,7 @@ in
|
|||||||
let pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
let pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||||
in {
|
in {
|
||||||
devShells.x86_64-linux.default = pkgs.mkShell {
|
devShells.x86_64-linux.default = pkgs.mkShell {
|
||||||
packages = with pkgs; [ nodejs_20 nodePackages.pnpm ];
|
packages = with pkgs; [ nodejs nodePackages.pnpm ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ in
|
|||||||
cargo
|
cargo
|
||||||
go
|
go
|
||||||
python3
|
python3
|
||||||
nodejs_20
|
nodejs
|
||||||
deno
|
deno
|
||||||
bun
|
bun
|
||||||
|
|
||||||
@@ -180,7 +180,7 @@ in
|
|||||||
|
|
||||||
# Database clients
|
# Database clients
|
||||||
postgresql
|
postgresql
|
||||||
mysql80
|
mysql
|
||||||
sqlite
|
sqlite
|
||||||
redis
|
redis
|
||||||
mongodb-tools
|
mongodb-tools
|
||||||
@@ -222,7 +222,7 @@ in
|
|||||||
mpv
|
mpv
|
||||||
vlc
|
vlc
|
||||||
obs-studio
|
obs-studio
|
||||||
kdePackages.kdenlive
|
kdenlive
|
||||||
handbrake
|
handbrake
|
||||||
ffmpeg-full
|
ffmpeg-full
|
||||||
|
|
||||||
@@ -245,7 +245,7 @@ in
|
|||||||
# PDF
|
# PDF
|
||||||
zathura
|
zathura
|
||||||
evince
|
evince
|
||||||
kdePackages.okular
|
okular
|
||||||
mupdf
|
mupdf
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -264,7 +264,7 @@ in
|
|||||||
signal-desktop
|
signal-desktop
|
||||||
element-desktop
|
element-desktop
|
||||||
zoom-us
|
zoom-us
|
||||||
# teams not available on x86_64-linux
|
teams
|
||||||
|
|
||||||
# Office
|
# Office
|
||||||
libreoffice
|
libreoffice
|
||||||
@@ -305,7 +305,7 @@ in
|
|||||||
lutris
|
lutris
|
||||||
wine
|
wine
|
||||||
winetricks
|
winetricks
|
||||||
proton-ge-bin
|
protonup-rs
|
||||||
mangohud
|
mangohud
|
||||||
gamemode
|
gamemode
|
||||||
discord
|
discord
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
;;
|
;;
|
||||||
node|js)
|
node|js)
|
||||||
echo "Starting Node.js development shell..."
|
echo "Starting Node.js development shell..."
|
||||||
nix-shell -p nodejs_20 nodePackages.pnpm nodePackages.typescript
|
nix-shell -p nodejs nodePackages.pnpm nodePackages.typescript
|
||||||
;;
|
;;
|
||||||
c|cpp)
|
c|cpp)
|
||||||
echo "Starting C/C++ development shell..."
|
echo "Starting C/C++ development shell..."
|
||||||
|
|||||||
115
test-iso-build.sh
Executable file
115
test-iso-build.sh
Executable file
@@ -0,0 +1,115 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Quick ISO build test script
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "🧪 OmniXY ISO Build Test"
|
||||||
|
echo "========================"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Check if we're in the right directory
|
||||||
|
if [ ! -f "flake.nix" ] || [ ! -f "iso.nix" ]; then
|
||||||
|
echo "❌ Error: Must be run from the OmniXY project root directory"
|
||||||
|
echo " Expected files: flake.nix, iso.nix"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if nix is available
|
||||||
|
if ! command -v nix &> /dev/null; then
|
||||||
|
echo "❌ Error: Nix is not installed or not in PATH"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check flakes support
|
||||||
|
if ! nix --help | grep -q flakes; then
|
||||||
|
echo "❌ Error: Nix flakes not enabled"
|
||||||
|
echo " Add 'experimental-features = nix-command flakes' to nix.conf"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "✅ Environment checks passed"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Test flake evaluation
|
||||||
|
echo "🔍 Testing flake evaluation..."
|
||||||
|
if nix flake check --no-build 2>/dev/null; then
|
||||||
|
echo "✅ Flake configuration is valid"
|
||||||
|
else
|
||||||
|
echo "⚠️ Flake check warnings (this is usually fine for ISO builds)"
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Test ISO configuration evaluation
|
||||||
|
echo "🔍 Testing ISO configuration..."
|
||||||
|
if nix eval .#nixosConfigurations.omnixy-iso --apply 'config: "ISO config loads successfully"' &>/dev/null; then
|
||||||
|
echo "✅ ISO configuration evaluates successfully"
|
||||||
|
else
|
||||||
|
echo "❌ ISO configuration has evaluation errors"
|
||||||
|
echo " Try: nix eval .#nixosConfigurations.omnixy-iso --show-trace"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Estimate build requirements
|
||||||
|
echo "📊 Build Requirements:"
|
||||||
|
echo " • Disk space: ~10-15 GB during build, ~3-5 GB for final ISO"
|
||||||
|
echo " • RAM: Recommended 8+ GB (minimum 4 GB)"
|
||||||
|
echo " • Time: 30-60 minutes on first build (varies by system)"
|
||||||
|
echo " • Network: Several GB of downloads on first build"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Ask if user wants to proceed with actual build
|
||||||
|
read -p "🚀 Do you want to proceed with building the ISO? (y/N): " -n 1 -r
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
|
echo "🏗️ Starting ISO build..."
|
||||||
|
echo " This may take a while. Press Ctrl+C to cancel."
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Start the build with progress
|
||||||
|
if nix build .#iso --print-build-logs; then
|
||||||
|
echo ""
|
||||||
|
echo "✅ ISO build completed successfully!"
|
||||||
|
|
||||||
|
# Find and display the ISO
|
||||||
|
if [ -L "./result" ]; then
|
||||||
|
iso_path=$(readlink -f ./result)
|
||||||
|
iso_file=$(find "$iso_path" -name "*.iso" | head -1)
|
||||||
|
|
||||||
|
if [ -n "$iso_file" ]; then
|
||||||
|
iso_size=$(du -h "$iso_file" | cut -f1)
|
||||||
|
echo "📁 ISO Location: $iso_file"
|
||||||
|
echo "📏 ISO Size: $iso_size"
|
||||||
|
echo ""
|
||||||
|
echo "🚀 Next steps:"
|
||||||
|
echo " • Test in VM: qemu-system-x86_64 -cdrom '$iso_file' -m 4G -enable-kvm"
|
||||||
|
echo " • Flash to USB: sudo dd if='$iso_file' of=/dev/sdX bs=4M status=progress"
|
||||||
|
echo " • See BUILD_ISO.md for complete documentation"
|
||||||
|
else
|
||||||
|
echo "⚠️ ISO file not found in build result"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "⚠️ Build result symlink not found"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "❌ ISO build failed"
|
||||||
|
echo " Check the error messages above for details"
|
||||||
|
echo " Common solutions:"
|
||||||
|
echo " • Free up disk space: nix-collect-garbage -d"
|
||||||
|
echo " • Check internet connection"
|
||||||
|
echo " • Try again (builds can sometimes fail on first attempt)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "🛑 Build cancelled. You can run this test anytime with:"
|
||||||
|
echo " ./test-iso-build.sh"
|
||||||
|
echo ""
|
||||||
|
echo "To build manually:"
|
||||||
|
echo " nix build .#iso"
|
||||||
|
echo " nix run .#build-iso"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "📚 For more information, see BUILD_ISO.md"
|
||||||
Reference in New Issue
Block a user