Merge pull request #10 from numtide/add-docs

add minimal docs framework
This commit is contained in:
Jörg Thalheim 2022-12-21 18:38:10 +00:00 committed by GitHub
commit a5504c8b55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 105 additions and 26 deletions

17
docs/SUMMARY.md Normal file
View 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
View File

@ -0,0 +1,6 @@
[book]
authors = [ ]
language = "en"
multilingual = false
src = "."
title = "nixos-remote - install NixOS everywhere"

20
docs/cli.md Normal file
View 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
View 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
View File

@ -0,0 +1,7 @@
# Installation
- [Bare Metal Platforms](#)
- [Virtualized Platforms](#)
- [Cloud Platforms](#)
- [Local Platforms](#)
- [Single Board Computers](#)

7
docs/introduction.md Normal file
View File

@ -0,0 +1,7 @@
# Introduction
- [What is nixos-remote?](#)
- [Quickstart](#)
- [Getting Started](#)
- [System Requirements](#)
- [Support Matrix](#)

View File

@ -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");
};
};
};
};
}