mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-08-16 20:00:36 +03:00
Merge pull request #10 from numtide/add-docs
add minimal docs framework
This commit is contained in:
commit
a5504c8b55
17
docs/SUMMARY.md
Normal file
17
docs/SUMMARY.md
Normal file
@ -0,0 +1,17 @@
|
||||
# Table of Content
|
||||
|
||||
- [Introduction](./introduction.md)
|
||||
- [What is nixos-remote?](#)
|
||||
- [Quickstart](#)
|
||||
- [Getting Started](#)
|
||||
- [System Requirements](#)
|
||||
- [Support Matrix](#)
|
||||
- [Installation](./installation.md)
|
||||
- [Bare Metal Platforms](#)
|
||||
- [Virtualized Platforms](#)
|
||||
- [Cloud Platforms](#)
|
||||
- [Local Platforms](#)
|
||||
- [Single Board Computers](#)
|
||||
- [Avanced Guides](#)
|
||||
- [Reference](#)
|
||||
- [CLI](./cli.md)
|
6
docs/book.toml
Normal file
6
docs/book.toml
Normal file
@ -0,0 +1,6 @@
|
||||
[book]
|
||||
authors = [ ]
|
||||
language = "en"
|
||||
multilingual = false
|
||||
src = "."
|
||||
title = "nixos-remote - install NixOS everywhere"
|
20
docs/cli.md
Normal file
20
docs/cli.md
Normal file
@ -0,0 +1,20 @@
|
||||
# CLI
|
||||
|
||||
```
|
||||
Usage: nixos-remote [options] ssh-host
|
||||
|
||||
Options:
|
||||
|
||||
* -f, --flake flake
|
||||
set the flake to install the system from
|
||||
* -s, --store-paths
|
||||
set the store paths to the disko-script and nixos-system directly
|
||||
if this is give, flake is not needed
|
||||
* --no-ssh-copy
|
||||
skip copying ssh-keys to target system
|
||||
* --kexec url
|
||||
use another kexec tarball to bootstrap NixOS
|
||||
* --debug
|
||||
enable debug output
|
||||
|
||||
```
|
17
docs/default.nix
Normal file
17
docs/default.nix
Normal file
@ -0,0 +1,17 @@
|
||||
{ mdbook, stdenv, writeShellScriptBin }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "nixos-remote-docs";
|
||||
buildInputs = [ mdbook ];
|
||||
src = ./.;
|
||||
buildPhase = "mdbook build";
|
||||
installPhase = ''
|
||||
mv book $out
|
||||
'';
|
||||
|
||||
# > nix run .#docs.serve
|
||||
passthru.serve = writeShellScriptBin "serve" ''
|
||||
cd docs
|
||||
${mdbook}/bin/mdbook serve
|
||||
'';
|
||||
}
|
7
docs/installation.md
Normal file
7
docs/installation.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Installation
|
||||
|
||||
- [Bare Metal Platforms](#)
|
||||
- [Virtualized Platforms](#)
|
||||
- [Cloud Platforms](#)
|
||||
- [Local Platforms](#)
|
||||
- [Single Board Computers](#)
|
7
docs/introduction.md
Normal file
7
docs/introduction.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Introduction
|
||||
|
||||
- [What is nixos-remote?](#)
|
||||
- [Quickstart](#)
|
||||
- [Getting Started](#)
|
||||
- [System Requirements](#)
|
||||
- [Support Matrix](#)
|
57
flake.nix
57
flake.nix
@ -5,31 +5,36 @@
|
||||
inputs.disko.url = "github:nix-community/disko/master";
|
||||
inputs.disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
outputs = { self, disko, nixpkgs, ... }: let
|
||||
supportedSystems = [
|
||||
"x86_64-linux"
|
||||
"i686-linux"
|
||||
"aarch64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||
in {
|
||||
packages = forAllSystems (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
nixos-remote = pkgs.callPackage ./package.nix {};
|
||||
default = self.packages.${system}.nixos-remote;
|
||||
});
|
||||
checks.x86_64-linux = let
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
in {
|
||||
from-nixos = import ./tests/from-nixos.nix {
|
||||
inherit pkgs;
|
||||
disko = disko.nixosModules.disko;
|
||||
makeTest = import (pkgs.path + "/nixos/tests/make-test-python.nix");
|
||||
eval-config = import (pkgs.path + "/nixos/lib/eval-config.nix");
|
||||
};
|
||||
outputs = { self, disko, nixpkgs, ... }:
|
||||
let
|
||||
supportedSystems = [
|
||||
"x86_64-linux"
|
||||
"i686-linux"
|
||||
"aarch64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||
in
|
||||
{
|
||||
packages = forAllSystems (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system}; in
|
||||
{
|
||||
default = self.packages.${system}.nixos-remote;
|
||||
docs = pkgs.callPackage ./docs { };
|
||||
nixos-remote = pkgs.callPackage ./nixos-remote.nix { };
|
||||
});
|
||||
checks.x86_64-linux =
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
in
|
||||
{
|
||||
from-nixos = import ./tests/from-nixos.nix {
|
||||
inherit pkgs;
|
||||
disko = disko.nixosModules.disko;
|
||||
makeTest = import (pkgs.path + "/nixos/tests/make-test-python.nix");
|
||||
eval-config = import (pkgs.path + "/nixos/lib/eval-config.nix");
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user