demo slides
This commit is contained in:
parent
3435b9813d
commit
a68f6d9290
348
slides/demo.md
348
slides/demo.md
@ -1,240 +1,158 @@
|
|||||||
---
|
---
|
||||||
title: A introduction to Nix(OS)
|
|
||||||
author: Birk
|
author: Birk
|
||||||
theme:
|
|
||||||
name: tokyonight-storm
|
|
||||||
options:
|
|
||||||
auto_render_languages:
|
|
||||||
- mermaid
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Customizability
|
# Nix(OS)
|
||||||
|
|
||||||
|
a introduction
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
_presenterm_ allows configuring almost anything about your presentation:
|
## What is Nix?
|
||||||
|
|
||||||
* The colors used.
|
* a domain specific language
|
||||||
* Layouts.
|
* a package manager
|
||||||
* Footers, including images in the footer.
|
* a Linux distribution
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
sequenceDiagram
|
%%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': true }}}%%
|
||||||
Mark --> Bob: Hello!
|
flowchart LR
|
||||||
Bob --> Mark: Oh, hi mark!
|
A(Nix language)
|
||||||
|
B(Nix package manager)
|
||||||
|
C(NixOS)
|
||||||
|
D(macOS)
|
||||||
|
E(Debian)
|
||||||
|
F(Software/User config)
|
||||||
|
G(Git)
|
||||||
|
H(File)
|
||||||
|
A-->B--->C & D & E---->F --> G & H
|
||||||
```
|
```
|
||||||
|
|
||||||
<!-- pause -->
|
|
||||||
|
|
||||||
This is an example on how to configure a footer:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
footer:
|
|
||||||
style: template
|
|
||||||
left:
|
|
||||||
image: doge.png
|
|
||||||
center: '<span class="noice">Colored</span> _footer_'
|
|
||||||
right: "{current_slide} / {total_slides}"
|
|
||||||
height: 5
|
|
||||||
|
|
||||||
palette:
|
|
||||||
classes:
|
|
||||||
noice:
|
|
||||||
foreground: red
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- end_slide -->
|
|
||||||
|
|
||||||
Headers
|
|
||||||
---
|
|
||||||
|
|
||||||
Markdown headers can be used to set slide titles like:
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
Headers
|
|
||||||
-------
|
|
||||||
```
|
|
||||||
|
|
||||||
# Headers
|
|
||||||
|
|
||||||
Each header type can be styled differently.
|
|
||||||
|
|
||||||
## Subheaders
|
|
||||||
|
|
||||||
### And more
|
|
||||||
|
|
||||||
<!-- end_slide -->
|
|
||||||
|
|
||||||
Code highlighting
|
|
||||||
---
|
|
||||||
|
|
||||||
Highlight code in 50+ programming languages:
|
|
||||||
|
|
||||||
```rust
|
|
||||||
// Rust
|
|
||||||
fn greet() -> &'static str {
|
|
||||||
"hi mom"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
```python
|
|
||||||
# Python
|
|
||||||
def greet() -> str:
|
|
||||||
return "hi mom"
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- pause -->
|
|
||||||
|
|
||||||
-------
|
|
||||||
|
|
||||||
Code snippets can have different styles including no background:
|
|
||||||
|
|
||||||
```cpp +no_background +line_numbers
|
|
||||||
// C++
|
|
||||||
string greet() {
|
|
||||||
return "hi mom";
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- end_slide -->
|
|
||||||
|
|
||||||
Dynamic code highlighting
|
|
||||||
---
|
|
||||||
|
|
||||||
Dynamically highlight different subsets of lines:
|
|
||||||
|
|
||||||
```rust {1-4|6-10|all} +line_numbers
|
|
||||||
#[derive(Clone, Debug)]
|
|
||||||
struct Person {
|
|
||||||
name: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Person {
|
|
||||||
fn say_hello(&self) {
|
|
||||||
println!("hello, I'm {}", self.name)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- end_slide -->
|
|
||||||
|
|
||||||
Snippet execution
|
|
||||||
---
|
|
||||||
|
|
||||||
Code snippets can be executed on demand:
|
|
||||||
|
|
||||||
* For 20+ languages, including compiled ones.
|
|
||||||
* Display their output in real time.
|
|
||||||
* Comment out unimportant lines to hide them.
|
|
||||||
|
|
||||||
```rust +exec
|
|
||||||
# use std::thread::sleep;
|
|
||||||
# use std::time::Duration;
|
|
||||||
fn main() {
|
|
||||||
let names = ["Alice", "Bob", "Eve", "Mallory", "Trent"];
|
|
||||||
for name in names {
|
|
||||||
println!("Hi {name}!");
|
|
||||||
sleep(Duration::from_millis(500));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- end_slide -->
|
|
||||||
|
|
||||||
Images
|
|
||||||
---
|
|
||||||
|
|
||||||
Images and animated gifs are supported in terminals such as:
|
|
||||||
|
|
||||||
* kitty
|
|
||||||
* iterm2
|
|
||||||
* wezterm
|
|
||||||
* ghostty
|
|
||||||
* Any sixel enabled terminal
|
|
||||||
|
|
||||||
<!-- column_layout: [1, 3, 1] -->
|
|
||||||
|
|
||||||
<!-- column: 1 -->
|
|
||||||
|
|
||||||
|
|
||||||
_Picture by Alexis Bailey / CC BY-NC 4.0_
|
|
||||||
|
|
||||||
<!-- end_slide -->
|
|
||||||
|
|
||||||
Column layouts
|
|
||||||
---
|
|
||||||
|
|
||||||
<!-- column_layout: [7, 3] -->
|
|
||||||
|
|
||||||
<!-- column: 0 -->
|
|
||||||
|
|
||||||
Use column layouts to structure your presentation:
|
|
||||||
|
|
||||||
* Define the number of columns.
|
|
||||||
* Adjust column widths as needed.
|
|
||||||
* Write content into every column.
|
|
||||||
|
|
||||||
```rust
|
|
||||||
fn potato() -> u32 {
|
|
||||||
42
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- column: 1 -->
|
|
||||||
|
|
||||||
<!-- reset_layout -->
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Layouts can be reset at any time.
|
## History
|
||||||
|
|
||||||
```python
|
- 2003: a declarative programming language
|
||||||
print("Hello world!")
|
- 2008: first stable NixOS version
|
||||||
|
- 2014: 10.000 packages
|
||||||
|
- 2019: Flakes
|
||||||
|
- 2025: [120.000 packages](https://repology.org/repositories/graphs)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- [declarative configuration](https://search.nixos.org/options?) (20.000 options)
|
||||||
|
- [package](https://search.nixos.org/packages) count (120.000 + third party)
|
||||||
|
- Development community on Github and other hosters
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Infrastructure
|
||||||
|
|
||||||
|
- [nixpkgs](https://github.com/NixOS/nixpkgs) on Github
|
||||||
|
- [nix language](https://github.com/NixOS/nix) on Github
|
||||||
|
- [Binary cache](https://cache.nixos.org/) for built packages
|
||||||
|
- [CI server](https://hydra.nixos.org/)
|
||||||
|
- [Build status](https://status.nixos.org/) page
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Demo
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
%%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': true }}}%%
|
||||||
|
flowchart TD
|
||||||
|
B(<b>Disk & OS Installation)
|
||||||
|
C(<b>Desktop)
|
||||||
|
D(Nextcloud server)
|
||||||
|
E(nspawn container)
|
||||||
|
F(Gitlab server)
|
||||||
|
G(Podman container)
|
||||||
|
H(Forgejo)
|
||||||
|
I(MicroVM)
|
||||||
|
J(Kubernetes)
|
||||||
|
K(Splunk)
|
||||||
|
B--> D & E & G & I
|
||||||
|
B-->C
|
||||||
|
E-->F
|
||||||
|
G-->H
|
||||||
|
I-->J-->K
|
||||||
```
|
```
|
||||||
|
|
||||||
<!-- end_slide -->
|
|
||||||
|
|
||||||
Text formatting
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Text formatting works including:
|
## Nextcloud
|
||||||
|
|
||||||
* **Bold text**.
|
```mermaid
|
||||||
* _Italics_.
|
%%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': true }}}%%
|
||||||
* **_Bold and italic_**.
|
flowchart TD
|
||||||
* ~Strikethrough~.
|
B(Disk & OS Installation)
|
||||||
* `Inline code`.
|
C[services.nextcloud.enable=true]
|
||||||
* Links [](https://example.com/)
|
D(<b>Nextcloud server)
|
||||||
* <span style="color: red">Colored</span> text.
|
E[services.nextcloud.package=nextcloud30]
|
||||||
* <span style="color: blue; background-color: black">Background color</span> can be changed too.
|
B--> D
|
||||||
|
D-->C & E
|
||||||
|
```
|
||||||
|
|
||||||
<!-- end_slide -->
|
|
||||||
|
|
||||||
More markdown
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Other markdown elements supported are:
|
## Gitlab
|
||||||
|
|
||||||
# Block quotes
|
```mermaid
|
||||||
|
%%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': true }}}%%
|
||||||
|
flowchart TD
|
||||||
|
B(<b>Disk & OS Installation)
|
||||||
|
E(nspawn container)
|
||||||
|
F(<b>Gitlab server)
|
||||||
|
G[services.gitlab.enable=true]
|
||||||
|
H[services.gitlab.backup.startAt=03:00]
|
||||||
|
I[services.nginx.enable=true]
|
||||||
|
B--> E --> F
|
||||||
|
F-->G & H & I
|
||||||
|
```
|
||||||
|
|
||||||
> Lorem ipsum dolor sit amet. Eos laudantium animi ut ipsam beataeet
|
|
||||||
> et exercitationem deleniti et quia maiores a cumque enim et
|
|
||||||
> aspernatur nesciunt sed adipisci quis.
|
|
||||||
|
|
||||||
# Alerts
|
|
||||||
|
|
||||||
> [!caution]
|
|
||||||
> Github style alerts
|
|
||||||
|
|
||||||
# Tables
|
|
||||||
|
|
||||||
| Name | Taste |
|
|
||||||
| ------ | ------ |
|
|
||||||
| Potato | Great |
|
|
||||||
| Carrot | Yuck |
|
|
||||||
|
|
||||||
<!-- end_slide -->
|
|
||||||
|
|
||||||
<!-- jump_to_middle -->
|
|
||||||
|
|
||||||
The end
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Forgejo
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
%%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': true }}}%%
|
||||||
|
flowchart LR
|
||||||
|
B(<b>Disk & OS Installation)
|
||||||
|
G(Podman container)
|
||||||
|
H(<b>Forgejo)
|
||||||
|
I[virtualisation.containers.enable=true]
|
||||||
|
J[virtualisation.oci-containers.containers.forgejo-frontend.image=codeberg.org/forgejo/forgejo:11.0.3-rootless]
|
||||||
|
K[forgejo-backend.image=docker.io/library/mariadb:11.8.2]
|
||||||
|
B --> I --> G --> H --> J & K
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Splunk
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
%%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': true }}}%%
|
||||||
|
flowchart LR
|
||||||
|
subgraph pc-demo1
|
||||||
|
direction LR
|
||||||
|
B(<b>Disk & OS Installation)
|
||||||
|
subgraph k8s
|
||||||
|
direction LR
|
||||||
|
I("MicroVM(NixOS)")
|
||||||
|
J(Kubernetes)
|
||||||
|
subgraph containerd
|
||||||
|
direction LR
|
||||||
|
L(Container)
|
||||||
|
K(<b>Splunk)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
B--> I --> J --> L --> K
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
12
slides/mkslides.yml
Normal file
12
slides/mkslides.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
slides:
|
||||||
|
theme: dracula
|
||||||
|
highlight_theme: nord
|
||||||
|
revealjs:
|
||||||
|
height: 768
|
||||||
|
width: 1024
|
||||||
|
transition: slide
|
||||||
|
center: true
|
||||||
|
plugins:
|
||||||
|
- name: RevealMermaid
|
||||||
|
extra_javascript:
|
||||||
|
- https://cdn.jsdelivr.net/npm/reveal.js-mermaid-plugin@11.6.0/plugin/mermaid/mermaid.min.js
|
Loading…
Reference in New Issue
Block a user