mirror of
https://github.com/nix-community/srvos.git
synced 2024-08-16 17:30:36 +03:00
Merge #110
110: switch docs to mkdocs r=zimbatm a=zimbatm Co-authored-by: zimbatm <zimbatm@zimbatm.com>
This commit is contained in:
commit
310588cb2e
2
.github/settings.yml
vendored
2
.github/settings.yml
vendored
@ -5,7 +5,7 @@ repository:
|
||||
name: srvos
|
||||
|
||||
# A short description of the repository that will show up on GitHub
|
||||
description: Server-optimized nixos configuration
|
||||
description: NixOS profiles for servers
|
||||
|
||||
# A URL with more information about the repository
|
||||
homepage: "https://numtide.github.io/srvos"
|
||||
|
2
.github/workflows/gh-pages.yml
vendored
2
.github/workflows/gh-pages.yml
vendored
@ -24,7 +24,7 @@ jobs:
|
||||
- name: Build
|
||||
id: build
|
||||
run: |
|
||||
nix build .#docs
|
||||
nix build ./dev#docs --override-input srvos "path:$PWD"
|
||||
echo "result=$(readlink ./result)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Deploy
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SrvOS - NixOS for your server
|
||||
# SrvOS - NixOS profiles for servers
|
||||
|
||||
STATUS: **experimental**
|
||||
|
||||
|
@ -17,5 +17,4 @@ status = [
|
||||
"nixosConfig example-roles-github-actions-runner-github-app",
|
||||
"nixosConfig example-roles-nix-remote-builder",
|
||||
"nixosConfig example-server",
|
||||
"package docs [x86_64-linux]",
|
||||
]
|
||||
|
@ -5,11 +5,11 @@ let
|
||||
keys = lib.attrNames;
|
||||
|
||||
borsChecks =
|
||||
map (name: '' "check ${name} [${system}]"'') (keys self.checks.${system})
|
||||
map (name: '' "check ${name} [${system}]"'') (keys self.checks.${system} or { })
|
||||
++
|
||||
map (name: '' "nixosConfig ${name}"'') (keys self.nixosConfigurations)
|
||||
map (name: '' "nixosConfig ${name}"'') (keys self.nixosConfigurations or { })
|
||||
++
|
||||
map (name: '' "package ${name} [${system}]"'') (keys self.packages.${system})
|
||||
map (name: '' "package ${name} [${system}]"'') (keys self.packages.${system} or { })
|
||||
;
|
||||
|
||||
borsTOML = pkgs.writeText "bors.toml" ''
|
||||
|
@ -5,12 +5,14 @@
|
||||
|
||||
inputs.nixpkgs.follows = "srvos/nixpkgs";
|
||||
|
||||
inputs.mkdocs-numtide.url = "github:numtide/mkdocs-numtide";
|
||||
|
||||
inputs.treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||
inputs.treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
inputs.flake-compat.url = "github:nix-community/flake-compat";
|
||||
|
||||
outputs = { self, nixpkgs, treefmt-nix, srvos, ... }:
|
||||
outputs = { self, nixpkgs, mkdocs-numtide, treefmt-nix, srvos, ... }:
|
||||
let
|
||||
eachSystem = f:
|
||||
nixpkgs.lib.genAttrs
|
||||
@ -25,10 +27,18 @@
|
||||
devShells = eachSystem (pkgs: {
|
||||
default = pkgs.mkShellNoCC {
|
||||
packages = [
|
||||
mkdocs-numtide.packages.${pkgs.system}.default
|
||||
pkgs.nixpkgs-fmt
|
||||
treefmt.${pkgs.system}
|
||||
];
|
||||
};
|
||||
});
|
||||
|
||||
packages = eachSystem (pkgs: {
|
||||
docs = mkdocs-numtide.lib.${pkgs.system}.mkDocs {
|
||||
name = "srvos";
|
||||
src = toString srvos;
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
@ -1,12 +0,0 @@
|
||||
# Table of Content
|
||||
|
||||
- [Hello](./hello.md)
|
||||
- [NixOS modules](./nixos.md)
|
||||
- [General](./nixos/general.md)
|
||||
- [Hardware](./nixos/hardware.md)
|
||||
- [Mixins](./nixos/mixins.md)
|
||||
- [Roles](./nixos/roles.md)
|
||||
- [GitHub Action Runner](./nixos/roles/github_actions_runner.md)
|
||||
- [Installation](./installation.md)
|
||||
- [Hetzner Cloud](./installation/hetzner_cloud.md)
|
||||
- [Design](./design.md)
|
@ -1,6 +0,0 @@
|
||||
[book]
|
||||
authors = [ ]
|
||||
language = "en"
|
||||
multilingual = false
|
||||
src = "."
|
||||
title = "SrvOS - NixOS for your server"
|
@ -1,21 +0,0 @@
|
||||
{ lib
|
||||
, coreutils
|
||||
, runCommand
|
||||
, writeShellScriptBin
|
||||
, mdbook
|
||||
}:
|
||||
runCommand
|
||||
"srvos-docs"
|
||||
{
|
||||
passthru.serve = writeShellScriptBin "serve" ''
|
||||
set -xeuo pipefail
|
||||
cd docs
|
||||
workdir=$(${coreutils}/bin/mktemp -d)
|
||||
trap 'rm -rf "$workdir"' EXIT
|
||||
${lib.getExe mdbook} serve --dest-dir "$workdir"
|
||||
'';
|
||||
}
|
||||
''
|
||||
cp -r ${lib.cleanSource ./.}/* .
|
||||
${lib.getExe mdbook} build --dest-dir "$out"
|
||||
''
|
@ -1,4 +0,0 @@
|
||||
# Design
|
||||
|
||||
This page explains some of the design decisions that have been made trough
|
||||
this project.
|
@ -1,3 +0,0 @@
|
||||
# Installation
|
||||
|
||||
* [Hetzner Cloud](./installation/hetzner_cloud.md)
|
@ -1,3 +0,0 @@
|
||||
## NixOS modules
|
||||
|
||||
All modules are defined in the repo's top-level `default.nix`
|
@ -1,6 +0,0 @@
|
||||
## Roles
|
||||
|
||||
Designed to take over a machine with the given role.
|
||||
|
||||
- [roles-github-actions-runner](./roles/github_actions_runner.md) configures [GitHub
|
||||
self hosted actions runner](https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners) on a machine
|
@ -18,10 +18,6 @@
|
||||
"x86_64-linux"
|
||||
];
|
||||
|
||||
packages = eachSystem ({ pkgs, ... }: {
|
||||
docs = pkgs.callPackage ./docs { };
|
||||
});
|
||||
|
||||
# generates future flake outputs: `modules.<kind>.<module-name>`
|
||||
modules.nixos = import ./nixos;
|
||||
|
||||
|
23
mkdocs.yml
Normal file
23
mkdocs.yml
Normal file
@ -0,0 +1,23 @@
|
||||
INHERIT: !ENV MKDOCS_NUMTIDE_THEME
|
||||
|
||||
### Site metadata ###
|
||||
|
||||
site_name: srvos
|
||||
site_description: NixOS profiles for servers
|
||||
site_url: https://numtide.github.io/srvos/
|
||||
repo_name: 'numtide/srvos'
|
||||
repo_url: https://github.com/numtide/srvos
|
||||
edit_uri: edit/main/docs
|
||||
|
||||
### Navigation ###
|
||||
|
||||
nav:
|
||||
- Hello: index.md
|
||||
- NixOS modules:
|
||||
- General: nixos/general.md
|
||||
- Hardware: nixos/hardware.md
|
||||
- Mixins: nixos/mixins.md
|
||||
- Roles:
|
||||
- GitHub Action Runner: nixos/roles/github_actions_runner.md
|
||||
- Installation:
|
||||
- Hetzner Cloud: installation/hetzner_cloud.md
|
Loading…
Reference in New Issue
Block a user