Add fresh install script for ISO installer
- Add installer/fresh-install.sh for installing from live ISO - Handles disk partitioning, LUKS encryption, filesystem setup - Generates minimal NixOS config for first boot - Enable flakes in ISO environment - Pass installer script content to ISO build via specialArgs Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
pkgs,
|
||||
modulesPath,
|
||||
inputs,
|
||||
installerScriptContent,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
@@ -68,6 +69,9 @@
|
||||
|
||||
# NixOS installation
|
||||
nixos-install-tools
|
||||
|
||||
# Nomarchy installer script
|
||||
(writeShellScriptBin "nomarchy-install" installerScriptContent)
|
||||
];
|
||||
|
||||
# Auto-login to installer
|
||||
@@ -80,7 +84,7 @@
|
||||
║ ║
|
||||
║ Welcome to the Nomarchy Installer ║
|
||||
║ ║
|
||||
║ Run 'nomarchy-install' to begin installation ║
|
||||
║ Run 'sudo nomarchy-install' to begin installation ║
|
||||
║ ║
|
||||
║ For more information: https://github.com/blu/nomarchy ║
|
||||
║ ║
|
||||
@@ -88,19 +92,6 @@
|
||||
|
||||
'';
|
||||
|
||||
# Copy installer script
|
||||
system.activationScripts.installer = ''
|
||||
mkdir -p /usr/local/bin
|
||||
cat > /usr/local/bin/nomarchy-install << 'INSTALLER'
|
||||
#!/usr/bin/env bash
|
||||
# Nomarchy ISO Installer - coming soon
|
||||
echo "ISO installer not yet implemented."
|
||||
echo "Please use the NixOS manual installation process,"
|
||||
echo "then run: nix run github:blu/nomarchy"
|
||||
INSTALLER
|
||||
chmod +x /usr/local/bin/nomarchy-install
|
||||
'';
|
||||
|
||||
# User account
|
||||
users.users.nixos = {
|
||||
isNormalUser = true;
|
||||
@@ -111,6 +102,9 @@
|
||||
# Allow passwordless sudo
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
# Enable flakes
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
# System state version
|
||||
system.stateVersion = "24.11";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user