GithubHelp home page GithubHelp logo

mic92 / nixos-remote Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nix-community/nixos-anywhere

1.0 1.0 0.0 59 KB

Nixos Remote Documentation Page

Home Page: https://numtide.github.io/nixos-remote

License: MIT License

Shell 45.02% Nix 54.98%

nixos-remote's Introduction

nixos-remote

Installing Nixos on a remote machine is complicated and time-consuming. The nixos-remote tool allows you to acess a remote server via SSH, partition and format its disks and install Nixos quickly and painlessly. Since nixos-remote makes use of stored configurations, you can repeat the same installation as often as you need, using a single nix-run command for each server. This tool is ideal for setting up Nixos in the cloud.

Overview

This tool is extremely useful when using cloud services such as Google, Amazon and Hezner. You can create standard configurations, and use the same configuration to create identical servers anywhere.

The partitioning and formatting options are specified in a disk configuration file. Further options can either be controlled by run-time switches, or by using a flake.

A single run-time command will then:

  • Connect to the remote server via SSH

  • Use the Linux kexec tool to boot into a Nixos installer

  • Use the disko tool to partition and format the hard drive

  • Install Nixos

  • Optionally, other NIX packages can be installed at the same time.

Important Note: Do not use a live server as the target, as it will be completely overwritten and all data lost. This tool should only be used for commissioning a new server, or repurposing an old server that contains no data that needs to be retained.

Prerequisites

  • Source Server:

    • Can be any Linux or Mac server with NIX installed, or a Nixos server.
  • Destination Server:

    • Must be an x86_64 Linux system with kexec support. Most x86_64 Linux systems do have kexec support.

    • Must have at least 2.5 GB of RAM, excluding swap.

How to use nixos_remote

The tool does not need to be installed, since it can be run directly from this repository.

First create a repo that includes the disk configuration file and, optionally, a flake that configures options. Samples of the disk configuration and flake files are included in the documentation. Full details of these configurations are given in the reference manual.

Once you have created these files, you can then run the tool with a single nix-run command, which may look like this:

nix run github:numtide/nixos-remote -- --flake github:JillThornhill/flakes-example#hetzner-cloud [email protected]

The Quickstart Guide gives full information on how to run nixos-remote in its simplest form. For more specific instructions to suit individual requirements, see the How-to Guide.

Licensing and Contribution details

This software is provided free under the MIT Licence.

If you would like to become a contributor, please see our contribution guidelines

Contributors

@lassulus

@Mic92

This software is brought to you courtesy of Numtide Consulting.

Numtide offers experienced consultants for hire, specializing in the following areas:

(Need a list of services)

Contact us)

nixos-remote's People

Contributors

bors[bot] avatar jillthornhill avatar lassulus avatar mic92 avatar phaer avatar zimbatm avatar

Stargazers

 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.