Giter Site home page Giter Site logo

alejandrosame / nixos-auto-installer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tfc/nixos-auto-installer

0.0 1.0 0.0 6 KB

Build recipe for an unattended, offline capable USB-bootable NixOS installer to bootstrap random computers

Nix 100.00%

nixos-auto-installer's Introduction

nixos-auto-installer

Build recipe for an unattended, offline capable USB-bootable NixOS installer to bootstrap random computers.

I typically use this to "transform" random computers to minimally setup NixOS machines by putting in my USB stick and boot from it. Afterward, the machine can be rebootet and then i can deploy whatever config i want over it from remote via SSH. The system is really just meant as a trampoline for installing "real" system configs from remote.

Usage

Warning: The created USB stick is destructive in the sense that it deletes everything on the disk without asking!

  1. Build the ISO image via nix build
  2. dd the ISO image over a USB stick
  3. Put the USB stick into a machine that is set up to boot via USB
  4. Let the machine boot and wait until it powers off again. (It typically takes ~5 minutes)
  5. NixOS is now installed. Just SSH into it.

Installation Scheme

The installer partitions the disk like this:

  • 512 MiB fat32 boot partition
  • 8 GiB swap partition
  • rest size ext4 nixos partition

The root user is the only user on the system. It has no password for physical login. The only way to login is via SSH with pubkey authentication (see Customization in this README).

Unfree modules for wifi are added in order to enable the machine's wifi on first boot.

Only SSH is installed as a service.

Customization

SSH Access

Add your SSH key here

WiFi

Add a wifi config to configuration.nix to let the machine automatically into your wifi after installation:

  networking.wireless = {
    enable = true;
    networks."my-wifi-name".psk = "my-wifi-password";
    userControlled.enable = true;
  };

There are different ways to add passwords to a machine, and this is not a secure one as the password will be stored in the nix store. (Which is fine for my purposes, but maybe not yours)

nixos-auto-installer's People

Contributors

tfc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.