This commit is contained in:
zimbatm 2023-02-15 09:36:25 +00:00
parent 2f0b7ba5c2
commit f1e68f552a
16 changed files with 631 additions and 26 deletions

View File

@ -1,2 +1,2 @@
cp -r /nix/store/4a6sj70iy57mr298a2byn8lypxwqd448-source/* .
cp -r /nix/store/6hb3fr02s2hywmb51rkkdrnqqvchmr79-source/* .
/nix/store/p0clv6nan6bqa0cr6agmrsy7d0d29m0h-mdbook-0.4.26/bin/mdbook build --dest-dir "$out"

View File

@ -82,7 +82,7 @@
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="hello.html"><strong aria-hidden="true">1.</strong> Hello</a></li><li class="chapter-item expanded "><a href="modules.html"><strong aria-hidden="true">2.</strong> Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="modules/general.html"><strong aria-hidden="true">2.1.</strong> General</a></li><li class="chapter-item expanded "><a href="modules/hardware.html"><strong aria-hidden="true">2.2.</strong> Hardware</a></li><li class="chapter-item expanded "><a href="modules/mixins.html"><strong aria-hidden="true">2.3.</strong> Mixins</a></li><li class="chapter-item expanded "><a href="modules/roles.html"><strong aria-hidden="true">2.4.</strong> Roles</a></li></ol></li><li class="chapter-item expanded "><a href="design.html"><strong aria-hidden="true">3.</strong> Design</a></li></ol>
<ol class="chapter"><li class="chapter-item expanded "><a href="hello.html"><strong aria-hidden="true">1.</strong> Hello</a></li><li class="chapter-item expanded "><a href="modules.html"><strong aria-hidden="true">2.</strong> Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="modules/general.html"><strong aria-hidden="true">2.1.</strong> General</a></li><li class="chapter-item expanded "><a href="modules/hardware.html"><strong aria-hidden="true">2.2.</strong> Hardware</a></li><li class="chapter-item expanded "><a href="modules/mixins.html"><strong aria-hidden="true">2.3.</strong> Mixins</a></li><li class="chapter-item expanded "><a href="modules/roles.html"><strong aria-hidden="true">2.4.</strong> Roles</a></li></ol></li><li class="chapter-item expanded "><a href="installation.html"><strong aria-hidden="true">3.</strong> Installation</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="installation/hetzner_cloud.html"><strong aria-hidden="true">3.1.</strong> Hetzner Cloud</a></li></ol></li><li class="chapter-item expanded "><a href="design.html"><strong aria-hidden="true">4.</strong> Design</a></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>

View File

@ -81,7 +81,7 @@
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="hello.html"><strong aria-hidden="true">1.</strong> Hello</a></li><li class="chapter-item expanded "><a href="modules.html"><strong aria-hidden="true">2.</strong> Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="modules/general.html"><strong aria-hidden="true">2.1.</strong> General</a></li><li class="chapter-item expanded "><a href="modules/hardware.html"><strong aria-hidden="true">2.2.</strong> Hardware</a></li><li class="chapter-item expanded "><a href="modules/mixins.html"><strong aria-hidden="true">2.3.</strong> Mixins</a></li><li class="chapter-item expanded "><a href="modules/roles.html"><strong aria-hidden="true">2.4.</strong> Roles</a></li></ol></li><li class="chapter-item expanded "><a href="design.html" class="active"><strong aria-hidden="true">3.</strong> Design</a></li></ol>
<ol class="chapter"><li class="chapter-item expanded "><a href="hello.html"><strong aria-hidden="true">1.</strong> Hello</a></li><li class="chapter-item expanded "><a href="modules.html"><strong aria-hidden="true">2.</strong> Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="modules/general.html"><strong aria-hidden="true">2.1.</strong> General</a></li><li class="chapter-item expanded "><a href="modules/hardware.html"><strong aria-hidden="true">2.2.</strong> Hardware</a></li><li class="chapter-item expanded "><a href="modules/mixins.html"><strong aria-hidden="true">2.3.</strong> Mixins</a></li><li class="chapter-item expanded "><a href="modules/roles.html"><strong aria-hidden="true">2.4.</strong> Roles</a></li></ol></li><li class="chapter-item expanded "><a href="installation.html"><strong aria-hidden="true">3.</strong> Installation</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="installation/hetzner_cloud.html"><strong aria-hidden="true">3.1.</strong> Hetzner Cloud</a></li></ol></li><li class="chapter-item expanded "><a href="design.html" class="active"><strong aria-hidden="true">4.</strong> Design</a></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@ -153,7 +153,7 @@ this project.</p>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="modules/roles.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="installation/hetzner_cloud.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
@ -164,7 +164,7 @@ this project.</p>
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a rel="prev" href="modules/roles.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="installation/hetzner_cloud.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>

View File

@ -3,10 +3,10 @@ declare -x HOME="/homeless-shelter"
declare -x HOST_PATH="/nix/store/lljkbrqh1nkayprky3lrigj0fbxj35rv-coreutils-9.1/bin:/nix/store/gmhwrs2qs86dfc4v347lni2nfwfi1hdp-findutils-4.9.0/bin:/nix/store/dangi3s2jn47ll5n77bhhgp1fbdjlrqw-diffutils-3.8/bin:/nix/store/7ywpyk7z2vlk6k8b1gkhmfxg0082r8yk-gnused-4.9/bin:/nix/store/5kzf7riyyqqh3mpdawpnfkpawarifxwr-gnugrep-3.7/bin:/nix/store/jq7v3l01q0461bf283y3na9ljg9l1064-gawk-5.2.1/bin:/nix/store/bm9cby2wqmdb9sv7zs4hgw0k59y6p147-gnutar-1.34/bin:/nix/store/iww7rl6rlv1jm8p12a6mc96f3iqnki6p-gzip-1.12/bin:/nix/store/s2217ynn463r3jj3yy0ci66j1cnfapkm-bzip2-1.0.8-bin/bin:/nix/store/hzbivzf4fn6dl97lsj0w6xzxq2fni2yi-gnumake-4.4/bin:/nix/store/qqa28hmysc23yy081d178jfd9a1yk8aw-bash-5.2-p15/bin:/nix/store/48zscadjm3k10rhjdq5h26mjfwcx13bw-patch-2.7.6/bin:/nix/store/ma9lzyxvg5y8l55vnl3fcpd9h34lf759-xz-5.4.1-bin/bin:/nix/store/pv7b1r34c6lq9jclccpm5ihsh2pg64q1-file-5.43/bin"
declare -x NIX_BUILD_CORES="2"
declare -x NIX_BUILD_TOP="/build"
declare -x NIX_CFLAGS_COMPILE=" -frandom-seed=i2lkawf53d"
declare -x NIX_CFLAGS_COMPILE=" -frandom-seed=k09msgp29c"
declare -x NIX_ENFORCE_NO_NATIVE="1"
declare -x NIX_ENFORCE_PURITY="1"
declare -x NIX_LDFLAGS="-rpath /nix/store/i2lkawf53dl5nqsh3q637ibxl57ryl64-srvos-docs/lib64 -rpath /nix/store/i2lkawf53dl5nqsh3q637ibxl57ryl64-srvos-docs/lib "
declare -x NIX_LDFLAGS="-rpath /nix/store/k09msgp29cdrx4qizh3zdg0l2biq2qw9-srvos-docs/lib64 -rpath /nix/store/k09msgp29cdrx4qizh3zdg0l2biq2qw9-srvos-docs/lib "
declare -x NIX_LOG_FD="2"
declare -x NIX_SSL_CERT_FILE="/no-cert-file.crt"
declare -x NIX_STORE="/nix/store"
@ -45,7 +45,7 @@ declare -x enableParallelChecking="1"
declare -x mesonFlags=""
declare -x name="srvos-docs"
declare -x nativeBuildInputs=""
declare -x out="/nix/store/i2lkawf53dl5nqsh3q637ibxl57ryl64-srvos-docs"
declare -x out="/nix/store/k09msgp29cdrx4qizh3zdg0l2biq2qw9-srvos-docs"
declare -x outputs="out"
declare -x passAsFile="buildCommand"
declare -x patches=""

View File

@ -81,7 +81,7 @@
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="hello.html" class="active"><strong aria-hidden="true">1.</strong> Hello</a></li><li class="chapter-item expanded "><a href="modules.html"><strong aria-hidden="true">2.</strong> Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="modules/general.html"><strong aria-hidden="true">2.1.</strong> General</a></li><li class="chapter-item expanded "><a href="modules/hardware.html"><strong aria-hidden="true">2.2.</strong> Hardware</a></li><li class="chapter-item expanded "><a href="modules/mixins.html"><strong aria-hidden="true">2.3.</strong> Mixins</a></li><li class="chapter-item expanded "><a href="modules/roles.html"><strong aria-hidden="true">2.4.</strong> Roles</a></li></ol></li><li class="chapter-item expanded "><a href="design.html"><strong aria-hidden="true">3.</strong> Design</a></li></ol>
<ol class="chapter"><li class="chapter-item expanded "><a href="hello.html" class="active"><strong aria-hidden="true">1.</strong> Hello</a></li><li class="chapter-item expanded "><a href="modules.html"><strong aria-hidden="true">2.</strong> Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="modules/general.html"><strong aria-hidden="true">2.1.</strong> General</a></li><li class="chapter-item expanded "><a href="modules/hardware.html"><strong aria-hidden="true">2.2.</strong> Hardware</a></li><li class="chapter-item expanded "><a href="modules/mixins.html"><strong aria-hidden="true">2.3.</strong> Mixins</a></li><li class="chapter-item expanded "><a href="modules/roles.html"><strong aria-hidden="true">2.4.</strong> Roles</a></li></ol></li><li class="chapter-item expanded "><a href="installation.html"><strong aria-hidden="true">3.</strong> Installation</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="installation/hetzner_cloud.html"><strong aria-hidden="true">3.1.</strong> Hetzner Cloud</a></li></ol></li><li class="chapter-item expanded "><a href="design.html"><strong aria-hidden="true">4.</strong> Design</a></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@ -143,8 +143,35 @@
<div id="content" class="content">
<main>
<h1 id="hello"><a class="header" href="#hello">Hello</a></h1>
<p>Welcome to the new docs website.</p>
<p>For now it's mostly an information dump that needs to be sorted out.</p>
<p>SrvOS is a collection of opinionated and sharable NixOS configurations.</p>
<p>As we learn more about NixOS in various deployments, we end up re-writing the same modules and configs. This is a way for us to speed up and share our setups.</p>
<p>Instead of supporting everything, our goal is to target certain verticals and make the support super smooth there.</p>
<h2 id="quick-usage"><a class="header" href="#quick-usage">Quick Usage</a></h2>
<p>Add <code>srvos</code> to your <code>flake.nix</code> to augment your NixOS configuration. For
example to deploy a GitHub Action runner on Hetzner:</p>
<pre><code class="language-nix">{
inputs = {
srvos.url = &quot;github:numtide/srvos&quot;;
};
outputs = { srvos, nixpkgs, ... }: {
nixosConfigurations.myHost = nixpkgs.lib.nixosSystem {
system = &quot;x86_64-linux&quot;;
modules = [
srvos.nixosModules.common
srvos.nixosModules.hardware-hetzner-amd
srvos.nixosModules.roles-github-actions-runner
];
};
};
}
</code></pre>
<h2 id="technologies"><a class="header" href="#technologies">Technologies</a></h2>
<p>SrvOS is a thin wrapper, sitting on the shoulder of others:</p>
<ul>
<li><a href="https://nixos.org">Nix and NixOS</a> of course.</li>
<li><a href="https://github.com/numtide/nixos-anywhere">nixos-anywhere</a> to bootstrap new systems.</li>
<li><a href="https://github.com/nix-community/disko">disko</a> to partition and configure disks.</li>
</ul>
</main>

View File

@ -81,7 +81,7 @@
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="hello.html" class="active"><strong aria-hidden="true">1.</strong> Hello</a></li><li class="chapter-item expanded "><a href="modules.html"><strong aria-hidden="true">2.</strong> Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="modules/general.html"><strong aria-hidden="true">2.1.</strong> General</a></li><li class="chapter-item expanded "><a href="modules/hardware.html"><strong aria-hidden="true">2.2.</strong> Hardware</a></li><li class="chapter-item expanded "><a href="modules/mixins.html"><strong aria-hidden="true">2.3.</strong> Mixins</a></li><li class="chapter-item expanded "><a href="modules/roles.html"><strong aria-hidden="true">2.4.</strong> Roles</a></li></ol></li><li class="chapter-item expanded "><a href="design.html"><strong aria-hidden="true">3.</strong> Design</a></li></ol>
<ol class="chapter"><li class="chapter-item expanded "><a href="hello.html" class="active"><strong aria-hidden="true">1.</strong> Hello</a></li><li class="chapter-item expanded "><a href="modules.html"><strong aria-hidden="true">2.</strong> Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="modules/general.html"><strong aria-hidden="true">2.1.</strong> General</a></li><li class="chapter-item expanded "><a href="modules/hardware.html"><strong aria-hidden="true">2.2.</strong> Hardware</a></li><li class="chapter-item expanded "><a href="modules/mixins.html"><strong aria-hidden="true">2.3.</strong> Mixins</a></li><li class="chapter-item expanded "><a href="modules/roles.html"><strong aria-hidden="true">2.4.</strong> Roles</a></li></ol></li><li class="chapter-item expanded "><a href="installation.html"><strong aria-hidden="true">3.</strong> Installation</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="installation/hetzner_cloud.html"><strong aria-hidden="true">3.1.</strong> Hetzner Cloud</a></li></ol></li><li class="chapter-item expanded "><a href="design.html"><strong aria-hidden="true">4.</strong> Design</a></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@ -143,8 +143,35 @@
<div id="content" class="content">
<main>
<h1 id="hello"><a class="header" href="#hello">Hello</a></h1>
<p>Welcome to the new docs website.</p>
<p>For now it's mostly an information dump that needs to be sorted out.</p>
<p>SrvOS is a collection of opinionated and sharable NixOS configurations.</p>
<p>As we learn more about NixOS in various deployments, we end up re-writing the same modules and configs. This is a way for us to speed up and share our setups.</p>
<p>Instead of supporting everything, our goal is to target certain verticals and make the support super smooth there.</p>
<h2 id="quick-usage"><a class="header" href="#quick-usage">Quick Usage</a></h2>
<p>Add <code>srvos</code> to your <code>flake.nix</code> to augment your NixOS configuration. For
example to deploy a GitHub Action runner on Hetzner:</p>
<pre><code class="language-nix">{
inputs = {
srvos.url = &quot;github:numtide/srvos&quot;;
};
outputs = { srvos, nixpkgs, ... }: {
nixosConfigurations.myHost = nixpkgs.lib.nixosSystem {
system = &quot;x86_64-linux&quot;;
modules = [
srvos.nixosModules.common
srvos.nixosModules.hardware-hetzner-amd
srvos.nixosModules.roles-github-actions-runner
];
};
};
}
</code></pre>
<h2 id="technologies"><a class="header" href="#technologies">Technologies</a></h2>
<p>SrvOS is a thin wrapper, sitting on the shoulder of others:</p>
<ul>
<li><a href="https://nixos.org">Nix and NixOS</a> of course.</li>
<li><a href="https://github.com/numtide/nixos-anywhere">nixos-anywhere</a> to bootstrap new systems.</li>
<li><a href="https://github.com/nix-community/disko">disko</a> to partition and configure disks.</li>
</ul>
</main>

200
installation.html Normal file
View File

@ -0,0 +1,200 @@
<!DOCTYPE HTML>
<html lang="en" class="sidebar-visible no-js light">
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Installation - SrvOS - NixOS for your server</title>
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="favicon.svg">
<link rel="shortcut icon" href="favicon.png">
<link rel="stylesheet" href="css/variables.css">
<link rel="stylesheet" href="css/general.css">
<link rel="stylesheet" href="css/chrome.css">
<link rel="stylesheet" href="css/print.css" media="print">
<!-- Fonts -->
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
<link rel="stylesheet" href="fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="highlight.css">
<link rel="stylesheet" href="tomorrow-night.css">
<link rel="stylesheet" href="ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script>
var path_to_root = "";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
}
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
}
} catch (e) { }
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
var html = document.querySelector('html');
html.classList.remove('no-js')
html.classList.remove('light')
html.classList.add(theme);
html.classList.add('js');
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
}
html.classList.remove('sidebar-visible');
html.classList.add("sidebar-" + sidebar);
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="hello.html"><strong aria-hidden="true">1.</strong> Hello</a></li><li class="chapter-item expanded "><a href="modules.html"><strong aria-hidden="true">2.</strong> Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="modules/general.html"><strong aria-hidden="true">2.1.</strong> General</a></li><li class="chapter-item expanded "><a href="modules/hardware.html"><strong aria-hidden="true">2.2.</strong> Hardware</a></li><li class="chapter-item expanded "><a href="modules/mixins.html"><strong aria-hidden="true">2.3.</strong> Mixins</a></li><li class="chapter-item expanded "><a href="modules/roles.html"><strong aria-hidden="true">2.4.</strong> Roles</a></li></ol></li><li class="chapter-item expanded "><a href="installation.html" class="active"><strong aria-hidden="true">3.</strong> Installation</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="installation/hetzner_cloud.html"><strong aria-hidden="true">3.1.</strong> Hetzner Cloud</a></li></ol></li><li class="chapter-item expanded "><a href="design.html"><strong aria-hidden="true">4.</strong> Design</a></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">SrvOS - NixOS for your server</h1>
<div class="right-buttons">
<a href="print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
<ul id="searchresults">
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
});
</script>
<div id="content" class="content">
<main>
<h1 id="installation"><a class="header" href="#installation">Installation</a></h1>
<ul>
<li><a href="./installation/hetzner_cloud.html">Hetzner Cloud</a></li>
</ul>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="modules/roles.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="installation/hetzner_cloud.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
</div>
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a rel="prev" href="modules/roles.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="installation/hetzner_cloud.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script>
window.playground_copyable = true;
</script>
<script src="elasticlunr.min.js"></script>
<script src="mark.min.js"></script>
<script src="searcher.js"></script>
<script src="clipboard.min.js"></script>
<script src="highlight.js"></script>
<script src="book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>

View File

@ -0,0 +1,258 @@
<!DOCTYPE HTML>
<html lang="en" class="sidebar-visible no-js light">
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Hetzner Cloud - SrvOS - NixOS for your server</title>
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../favicon.svg">
<link rel="shortcut icon" href="../favicon.png">
<link rel="stylesheet" href="../css/variables.css">
<link rel="stylesheet" href="../css/general.css">
<link rel="stylesheet" href="../css/chrome.css">
<link rel="stylesheet" href="../css/print.css" media="print">
<!-- Fonts -->
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
<link rel="stylesheet" href="../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../highlight.css">
<link rel="stylesheet" href="../tomorrow-night.css">
<link rel="stylesheet" href="../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script>
var path_to_root = "../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
}
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
}
} catch (e) { }
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
var html = document.querySelector('html');
html.classList.remove('no-js')
html.classList.remove('light')
html.classList.add(theme);
html.classList.add('js');
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
}
html.classList.remove('sidebar-visible');
html.classList.add("sidebar-" + sidebar);
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../hello.html"><strong aria-hidden="true">1.</strong> Hello</a></li><li class="chapter-item expanded "><a href="../modules.html"><strong aria-hidden="true">2.</strong> Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../modules/general.html"><strong aria-hidden="true">2.1.</strong> General</a></li><li class="chapter-item expanded "><a href="../modules/hardware.html"><strong aria-hidden="true">2.2.</strong> Hardware</a></li><li class="chapter-item expanded "><a href="../modules/mixins.html"><strong aria-hidden="true">2.3.</strong> Mixins</a></li><li class="chapter-item expanded "><a href="../modules/roles.html"><strong aria-hidden="true">2.4.</strong> Roles</a></li></ol></li><li class="chapter-item expanded "><a href="../installation.html"><strong aria-hidden="true">3.</strong> Installation</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../installation/hetzner_cloud.html" class="active"><strong aria-hidden="true">3.1.</strong> Hetzner Cloud</a></li></ol></li><li class="chapter-item expanded "><a href="../design.html"><strong aria-hidden="true">4.</strong> Design</a></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">SrvOS - NixOS for your server</h1>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
<ul id="searchresults">
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
});
</script>
<div id="content" class="content">
<main>
<h1 id="hetzner-cloud-installation"><a class="header" href="#hetzner-cloud-installation">Hetzner Cloud installation</a></h1>
<blockquote>
<p>⚠️ Only works with VMs that have more than 2GB of RAM.</p>
</blockquote>
<blockquote>
<p>⚠️ This document reflects more of an ideal than reality right now.</p>
</blockquote>
<ol>
<li>Create the VM in Hetzner Cloud, get the IP, IPv6, set the SSH public key.</li>
<li>Create a new NixOS configuration in your flake:</li>
</ol>
<pre><code class="language-nix">{
inputs.nixos-anywhere.url = &quot;github:numtide/nixos-anywere&quot;;
inputs.srvos.url = &quot;github:numtide/srvos&quot;;
inputs.disko.url = &quot;github:nix-community/disko&quot;;
outputs = { self, nixos-remote, srvos, disko, nixpkgs }: {
nixosConfigurations.my-host = nixpkgs.lib.nixosSystem {
system = &quot;x86_64-linux&quot;;
modules = [{
imports = [
srvos.nixosModules.hardware-hetzner-cloud
srvos.nixosModules.server
# Are those together?
disko.nixosModules.disko
srvos.diskoModules.disk-layout-single-v1
];
networking.hostName = &quot;my-host&quot;;
# FIXME: Hetzner Cloud doesn't provide us with that configuration
systemd.network.networks.&quot;10-uplink&quot;.networkConfig.Address = &quot;2a01:4f9:c010:52fd::1/128&quot;;
}];
};
# TODO other $systems
devShells.x86_64-linux.default = with nixpkgs.legacyPackages.x86_64-linux; mkShellNoCC {
packages = [
# TODO: add nixos-rebuild as a package
nixos-anywhere.packages.x86_64-linux.default
];
};
};
}
</code></pre>
<ol start="3">
<li>
<p>Update the hostname and IPv6 address in the config.</p>
</li>
<li>
<p>Bootstrap the NixOS deployment:</p>
<pre><code class="language-console">$ nix develop
$ nixos-anywhere --flake .#my-host --target &lt;ip&gt;
</code></pre>
</li>
</ol>
<p>🎉</p>
<ol start="5">
<li>
<p>Pick a nixos deployment tool of your choice! Eg:</p>
<pre><code>$ nixos-rebuild --flake .#my-host --target &lt;ip&gt; switch
</code></pre>
</li>
</ol>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../installation.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../design.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
</div>
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a rel="prev" href="../installation.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../design.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script>
window.playground_copyable = true;
</script>
<script src="../elasticlunr.min.js"></script>
<script src="../mark.min.js"></script>
<script src="../searcher.js"></script>
<script src="../clipboard.min.js"></script>
<script src="../highlight.js"></script>
<script src="../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>

View File

@ -81,7 +81,7 @@
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="hello.html"><strong aria-hidden="true">1.</strong> Hello</a></li><li class="chapter-item expanded "><a href="modules.html" class="active"><strong aria-hidden="true">2.</strong> Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="modules/general.html"><strong aria-hidden="true">2.1.</strong> General</a></li><li class="chapter-item expanded "><a href="modules/hardware.html"><strong aria-hidden="true">2.2.</strong> Hardware</a></li><li class="chapter-item expanded "><a href="modules/mixins.html"><strong aria-hidden="true">2.3.</strong> Mixins</a></li><li class="chapter-item expanded "><a href="modules/roles.html"><strong aria-hidden="true">2.4.</strong> Roles</a></li></ol></li><li class="chapter-item expanded "><a href="design.html"><strong aria-hidden="true">3.</strong> Design</a></li></ol>
<ol class="chapter"><li class="chapter-item expanded "><a href="hello.html"><strong aria-hidden="true">1.</strong> Hello</a></li><li class="chapter-item expanded "><a href="modules.html" class="active"><strong aria-hidden="true">2.</strong> Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="modules/general.html"><strong aria-hidden="true">2.1.</strong> General</a></li><li class="chapter-item expanded "><a href="modules/hardware.html"><strong aria-hidden="true">2.2.</strong> Hardware</a></li><li class="chapter-item expanded "><a href="modules/mixins.html"><strong aria-hidden="true">2.3.</strong> Mixins</a></li><li class="chapter-item expanded "><a href="modules/roles.html"><strong aria-hidden="true">2.4.</strong> Roles</a></li></ol></li><li class="chapter-item expanded "><a href="installation.html"><strong aria-hidden="true">3.</strong> Installation</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="installation/hetzner_cloud.html"><strong aria-hidden="true">3.1.</strong> Hetzner Cloud</a></li></ol></li><li class="chapter-item expanded "><a href="design.html"><strong aria-hidden="true">4.</strong> Design</a></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>

View File

@ -81,7 +81,7 @@
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../hello.html"><strong aria-hidden="true">1.</strong> Hello</a></li><li class="chapter-item expanded "><a href="../modules.html"><strong aria-hidden="true">2.</strong> Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../modules/general.html" class="active"><strong aria-hidden="true">2.1.</strong> General</a></li><li class="chapter-item expanded "><a href="../modules/hardware.html"><strong aria-hidden="true">2.2.</strong> Hardware</a></li><li class="chapter-item expanded "><a href="../modules/mixins.html"><strong aria-hidden="true">2.3.</strong> Mixins</a></li><li class="chapter-item expanded "><a href="../modules/roles.html"><strong aria-hidden="true">2.4.</strong> Roles</a></li></ol></li><li class="chapter-item expanded "><a href="../design.html"><strong aria-hidden="true">3.</strong> Design</a></li></ol>
<ol class="chapter"><li class="chapter-item expanded "><a href="../hello.html"><strong aria-hidden="true">1.</strong> Hello</a></li><li class="chapter-item expanded "><a href="../modules.html"><strong aria-hidden="true">2.</strong> Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../modules/general.html" class="active"><strong aria-hidden="true">2.1.</strong> General</a></li><li class="chapter-item expanded "><a href="../modules/hardware.html"><strong aria-hidden="true">2.2.</strong> Hardware</a></li><li class="chapter-item expanded "><a href="../modules/mixins.html"><strong aria-hidden="true">2.3.</strong> Mixins</a></li><li class="chapter-item expanded "><a href="../modules/roles.html"><strong aria-hidden="true">2.4.</strong> Roles</a></li></ol></li><li class="chapter-item expanded "><a href="../installation.html"><strong aria-hidden="true">3.</strong> Installation</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../installation/hetzner_cloud.html"><strong aria-hidden="true">3.1.</strong> Hetzner Cloud</a></li></ol></li><li class="chapter-item expanded "><a href="../design.html"><strong aria-hidden="true">4.</strong> Design</a></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>

View File

@ -81,7 +81,7 @@
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../hello.html"><strong aria-hidden="true">1.</strong> Hello</a></li><li class="chapter-item expanded "><a href="../modules.html"><strong aria-hidden="true">2.</strong> Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../modules/general.html"><strong aria-hidden="true">2.1.</strong> General</a></li><li class="chapter-item expanded "><a href="../modules/hardware.html" class="active"><strong aria-hidden="true">2.2.</strong> Hardware</a></li><li class="chapter-item expanded "><a href="../modules/mixins.html"><strong aria-hidden="true">2.3.</strong> Mixins</a></li><li class="chapter-item expanded "><a href="../modules/roles.html"><strong aria-hidden="true">2.4.</strong> Roles</a></li></ol></li><li class="chapter-item expanded "><a href="../design.html"><strong aria-hidden="true">3.</strong> Design</a></li></ol>
<ol class="chapter"><li class="chapter-item expanded "><a href="../hello.html"><strong aria-hidden="true">1.</strong> Hello</a></li><li class="chapter-item expanded "><a href="../modules.html"><strong aria-hidden="true">2.</strong> Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../modules/general.html"><strong aria-hidden="true">2.1.</strong> General</a></li><li class="chapter-item expanded "><a href="../modules/hardware.html" class="active"><strong aria-hidden="true">2.2.</strong> Hardware</a></li><li class="chapter-item expanded "><a href="../modules/mixins.html"><strong aria-hidden="true">2.3.</strong> Mixins</a></li><li class="chapter-item expanded "><a href="../modules/roles.html"><strong aria-hidden="true">2.4.</strong> Roles</a></li></ol></li><li class="chapter-item expanded "><a href="../installation.html"><strong aria-hidden="true">3.</strong> Installation</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../installation/hetzner_cloud.html"><strong aria-hidden="true">3.1.</strong> Hetzner Cloud</a></li></ol></li><li class="chapter-item expanded "><a href="../design.html"><strong aria-hidden="true">4.</strong> Design</a></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>

View File

@ -81,7 +81,7 @@
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../hello.html"><strong aria-hidden="true">1.</strong> Hello</a></li><li class="chapter-item expanded "><a href="../modules.html"><strong aria-hidden="true">2.</strong> Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../modules/general.html"><strong aria-hidden="true">2.1.</strong> General</a></li><li class="chapter-item expanded "><a href="../modules/hardware.html"><strong aria-hidden="true">2.2.</strong> Hardware</a></li><li class="chapter-item expanded "><a href="../modules/mixins.html" class="active"><strong aria-hidden="true">2.3.</strong> Mixins</a></li><li class="chapter-item expanded "><a href="../modules/roles.html"><strong aria-hidden="true">2.4.</strong> Roles</a></li></ol></li><li class="chapter-item expanded "><a href="../design.html"><strong aria-hidden="true">3.</strong> Design</a></li></ol>
<ol class="chapter"><li class="chapter-item expanded "><a href="../hello.html"><strong aria-hidden="true">1.</strong> Hello</a></li><li class="chapter-item expanded "><a href="../modules.html"><strong aria-hidden="true">2.</strong> Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../modules/general.html"><strong aria-hidden="true">2.1.</strong> General</a></li><li class="chapter-item expanded "><a href="../modules/hardware.html"><strong aria-hidden="true">2.2.</strong> Hardware</a></li><li class="chapter-item expanded "><a href="../modules/mixins.html" class="active"><strong aria-hidden="true">2.3.</strong> Mixins</a></li><li class="chapter-item expanded "><a href="../modules/roles.html"><strong aria-hidden="true">2.4.</strong> Roles</a></li></ol></li><li class="chapter-item expanded "><a href="../installation.html"><strong aria-hidden="true">3.</strong> Installation</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../installation/hetzner_cloud.html"><strong aria-hidden="true">3.1.</strong> Hetzner Cloud</a></li></ol></li><li class="chapter-item expanded "><a href="../design.html"><strong aria-hidden="true">4.</strong> Design</a></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>

View File

@ -81,7 +81,7 @@
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../hello.html"><strong aria-hidden="true">1.</strong> Hello</a></li><li class="chapter-item expanded "><a href="../modules.html"><strong aria-hidden="true">2.</strong> Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../modules/general.html"><strong aria-hidden="true">2.1.</strong> General</a></li><li class="chapter-item expanded "><a href="../modules/hardware.html"><strong aria-hidden="true">2.2.</strong> Hardware</a></li><li class="chapter-item expanded "><a href="../modules/mixins.html"><strong aria-hidden="true">2.3.</strong> Mixins</a></li><li class="chapter-item expanded "><a href="../modules/roles.html" class="active"><strong aria-hidden="true">2.4.</strong> Roles</a></li></ol></li><li class="chapter-item expanded "><a href="../design.html"><strong aria-hidden="true">3.</strong> Design</a></li></ol>
<ol class="chapter"><li class="chapter-item expanded "><a href="../hello.html"><strong aria-hidden="true">1.</strong> Hello</a></li><li class="chapter-item expanded "><a href="../modules.html"><strong aria-hidden="true">2.</strong> Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../modules/general.html"><strong aria-hidden="true">2.1.</strong> General</a></li><li class="chapter-item expanded "><a href="../modules/hardware.html"><strong aria-hidden="true">2.2.</strong> Hardware</a></li><li class="chapter-item expanded "><a href="../modules/mixins.html"><strong aria-hidden="true">2.3.</strong> Mixins</a></li><li class="chapter-item expanded "><a href="../modules/roles.html" class="active"><strong aria-hidden="true">2.4.</strong> Roles</a></li></ol></li><li class="chapter-item expanded "><a href="../installation.html"><strong aria-hidden="true">3.</strong> Installation</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../installation/hetzner_cloud.html"><strong aria-hidden="true">3.1.</strong> Hetzner Cloud</a></li></ol></li><li class="chapter-item expanded "><a href="../design.html"><strong aria-hidden="true">4.</strong> Design</a></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@ -156,7 +156,7 @@
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../design.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../installation.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
@ -170,7 +170,7 @@
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../design.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../installation.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>

View File

@ -82,7 +82,7 @@
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="hello.html"><strong aria-hidden="true">1.</strong> Hello</a></li><li class="chapter-item expanded "><a href="modules.html"><strong aria-hidden="true">2.</strong> Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="modules/general.html"><strong aria-hidden="true">2.1.</strong> General</a></li><li class="chapter-item expanded "><a href="modules/hardware.html"><strong aria-hidden="true">2.2.</strong> Hardware</a></li><li class="chapter-item expanded "><a href="modules/mixins.html"><strong aria-hidden="true">2.3.</strong> Mixins</a></li><li class="chapter-item expanded "><a href="modules/roles.html"><strong aria-hidden="true">2.4.</strong> Roles</a></li></ol></li><li class="chapter-item expanded "><a href="design.html"><strong aria-hidden="true">3.</strong> Design</a></li></ol>
<ol class="chapter"><li class="chapter-item expanded "><a href="hello.html"><strong aria-hidden="true">1.</strong> Hello</a></li><li class="chapter-item expanded "><a href="modules.html"><strong aria-hidden="true">2.</strong> Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="modules/general.html"><strong aria-hidden="true">2.1.</strong> General</a></li><li class="chapter-item expanded "><a href="modules/hardware.html"><strong aria-hidden="true">2.2.</strong> Hardware</a></li><li class="chapter-item expanded "><a href="modules/mixins.html"><strong aria-hidden="true">2.3.</strong> Mixins</a></li><li class="chapter-item expanded "><a href="modules/roles.html"><strong aria-hidden="true">2.4.</strong> Roles</a></li></ol></li><li class="chapter-item expanded "><a href="installation.html"><strong aria-hidden="true">3.</strong> Installation</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="installation/hetzner_cloud.html"><strong aria-hidden="true">3.1.</strong> Hetzner Cloud</a></li></ol></li><li class="chapter-item expanded "><a href="design.html"><strong aria-hidden="true">4.</strong> Design</a></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@ -144,8 +144,35 @@
<div id="content" class="content">
<main>
<h1 id="hello"><a class="header" href="#hello">Hello</a></h1>
<p>Welcome to the new docs website.</p>
<p>For now it's mostly an information dump that needs to be sorted out.</p>
<p>SrvOS is a collection of opinionated and sharable NixOS configurations.</p>
<p>As we learn more about NixOS in various deployments, we end up re-writing the same modules and configs. This is a way for us to speed up and share our setups.</p>
<p>Instead of supporting everything, our goal is to target certain verticals and make the support super smooth there.</p>
<h2 id="quick-usage"><a class="header" href="#quick-usage">Quick Usage</a></h2>
<p>Add <code>srvos</code> to your <code>flake.nix</code> to augment your NixOS configuration. For
example to deploy a GitHub Action runner on Hetzner:</p>
<pre><code class="language-nix">{
inputs = {
srvos.url = &quot;github:numtide/srvos&quot;;
};
outputs = { srvos, nixpkgs, ... }: {
nixosConfigurations.myHost = nixpkgs.lib.nixosSystem {
system = &quot;x86_64-linux&quot;;
modules = [
srvos.nixosModules.common
srvos.nixosModules.hardware-hetzner-amd
srvos.nixosModules.roles-github-actions-runner
];
};
};
}
</code></pre>
<h2 id="technologies"><a class="header" href="#technologies">Technologies</a></h2>
<p>SrvOS is a thin wrapper, sitting on the shoulder of others:</p>
<ul>
<li><a href="https://nixos.org">Nix and NixOS</a> of course.</li>
<li><a href="https://github.com/numtide/nixos-anywhere">nixos-anywhere</a> to bootstrap new systems.</li>
<li><a href="https://github.com/nix-community/disko">disko</a> to partition and configure disks.</li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h2 id="modules"><a class="header" href="#modules">Modules</a></h2>
<p>All modules are defined in the repo's top-level <code>default.nix</code></p>
<div style="break-before: page; page-break-before: always;"></div><h2 id="general"><a class="header" href="#general">General</a></h2>
@ -205,6 +232,72 @@ for monitoring rules targeting this telegraf configuration.</li>
<ul>
<li><code>roles-github-actions-runner</code> configures GitHub actions runner on a machine</li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="installation"><a class="header" href="#installation">Installation</a></h1>
<ul>
<li><a href="./installation/hetzner_cloud.html">Hetzner Cloud</a></li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="hetzner-cloud-installation"><a class="header" href="#hetzner-cloud-installation">Hetzner Cloud installation</a></h1>
<blockquote>
<p>⚠️ Only works with VMs that have more than 2GB of RAM.</p>
</blockquote>
<blockquote>
<p>⚠️ This document reflects more of an ideal than reality right now.</p>
</blockquote>
<ol>
<li>Create the VM in Hetzner Cloud, get the IP, IPv6, set the SSH public key.</li>
<li>Create a new NixOS configuration in your flake:</li>
</ol>
<pre><code class="language-nix">{
inputs.nixos-anywhere.url = &quot;github:numtide/nixos-anywere&quot;;
inputs.srvos.url = &quot;github:numtide/srvos&quot;;
inputs.disko.url = &quot;github:nix-community/disko&quot;;
outputs = { self, nixos-remote, srvos, disko, nixpkgs }: {
nixosConfigurations.my-host = nixpkgs.lib.nixosSystem {
system = &quot;x86_64-linux&quot;;
modules = [{
imports = [
srvos.nixosModules.hardware-hetzner-cloud
srvos.nixosModules.server
# Are those together?
disko.nixosModules.disko
srvos.diskoModules.disk-layout-single-v1
];
networking.hostName = &quot;my-host&quot;;
# FIXME: Hetzner Cloud doesn't provide us with that configuration
systemd.network.networks.&quot;10-uplink&quot;.networkConfig.Address = &quot;2a01:4f9:c010:52fd::1/128&quot;;
}];
};
# TODO other $systems
devShells.x86_64-linux.default = with nixpkgs.legacyPackages.x86_64-linux; mkShellNoCC {
packages = [
# TODO: add nixos-rebuild as a package
nixos-anywhere.packages.x86_64-linux.default
];
};
};
}
</code></pre>
<ol start="3">
<li>
<p>Update the hostname and IPv6 address in the config.</p>
</li>
<li>
<p>Bootstrap the NixOS deployment:</p>
<pre><code class="language-console">$ nix develop
$ nixos-anywhere --flake .#my-host --target &lt;ip&gt;
</code></pre>
</li>
</ol>
<p>🎉</p>
<ol start="5">
<li>
<p>Pick a nixos deployment tool of your choice! Eg:</p>
<pre><code>$ nixos-rebuild --flake .#my-host --target &lt;ip&gt; switch
</code></pre>
</li>
</ol>
<div style="break-before: page; page-break-before: always;"></div><h1 id="design"><a class="header" href="#design">Design</a></h1>
<p>This page explains some of the design decisions that have been made trough
this project.</p>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long