slide updates, links

This commit is contained in:
Kateřina Churanová 2024-07-11 13:49:04 +02:00
parent 814f89e0f8
commit c354515db6
Signed by: shine
GPG key ID: 629A93F9B0E2ED8E
8 changed files with 59 additions and 22 deletions

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 22 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 23 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -13,7 +13,12 @@
outputs = outputs =
inputs@{ flake-parts, nci, ... }: inputs@{ flake-parts, nci, ... }:
flake-parts.lib.mkFlake { inherit inputs; } { flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ]; systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
imports = [ imports = [
nci.flakeModule nci.flakeModule
./crates.nix ./crates.nix

View file

@ -33,6 +33,7 @@
{ {
treefmt = { treefmt = {
programs.nixfmt.enable = true; programs.nixfmt.enable = true;
programs.prettier.enable = true;
projectRootFile = "flake.nix"; projectRootFile = "flake.nix";
}; };
devshells.default = { devshells.default = {

View file

@ -1,13 +1,12 @@
const canonicalUrl = process.env.URL || undefined const canonicalUrl = process.env.URL || undefined;
/** @type {import('@marp-team/marp-cli').Config} */ /** @type {import('@marp-team/marp-cli').Config} */
const config = { const config = {
allowLocalFiles: true, allowLocalFiles: true,
themeSet: 'themes', themeSet: "themes",
url: canonicalUrl, url: canonicalUrl,
inputDir: "./slides", inputDir: "./slides",
output: "./present" output: "./present",
};
} export default config;
export default config

View file

@ -1,15 +1,15 @@
--- ---
marp: true marp: true
lang: en-US lang: en-US
title: Marp CLI example title: Reproducible development environments with Nix
description: Hosting Marp slide deck on the web
theme: nix_talk theme: nix_talk
transition: fade transition: fade
paginate: true paginate: true
_paginate: false _paginate: false
--- ---
# Nix for Rustaceans # Reproducible development environments with Nix
#### Kateřina "Kate" Churanová #### Kateřina "Kate" Churanová
--- ---
@ -18,7 +18,6 @@ _paginate: false
- Purely functional programming language - Purely functional programming language
- Package manager - Package manager
- Linux distribution (NixOS)
- multiplatform (Linux, Mac OS, BSD-ish) - multiplatform (Linux, Mac OS, BSD-ish)
--- ---
@ -29,6 +28,15 @@ _paginate: false
- Well documented - Well documented
- Opinionated - Opinionated
---
# What is it for
- Access to huge repository of various packages
- Declarative way to define builds and build enviroment and their configuration
- Coexistence of various versions of software and libraries on the same system
*Every simple configuration language will eventually end up being turing complete*
--- ---
# Nix derivation # Nix derivation
@ -95,14 +103,20 @@ _paginate: false
--- ---
# Flake parts - Minimal modular framework # Flake parts - Minimal modular framework
## Dev environment management ## Dev environment management
- Devshell - Devshell
- Devenv - Devenv
## Rust project building ## Rust project building
- NCI (Nix cargo integration) - NCI (Nix cargo integration)
--- ---
# Basic flake parts project # Basic flake parts project
```nix ```nix
{ {
inputs = { inputs = {
@ -126,7 +140,9 @@ _paginate: false
--- ---
# Fun begins with Rust # Fun begins with Rust
### flake.nix ### flake.nix
```nix ```nix
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
@ -170,7 +186,9 @@ outputs = inputs @ {
``` ```
--- ---
### crates.nix ### crates.nix
```nix ```nix
{...}: { {...}: {
perSystem = { perSystem = {
@ -196,6 +214,7 @@ outputs = inputs @ {
- Extremely simple generation of lightweight OCI containers - Extremely simple generation of lightweight OCI containers
--- ---
```nix ```nix
packages.container = pkgs.dockerTools.streamLayeredImage { packages.container = pkgs.dockerTools.streamLayeredImage {
name = crateName; name = crateName;
@ -206,3 +225,13 @@ outputs = inputs @ {
}; };
}; };
``` ```
---
# Other learning materials
### Fasterthanlime's series on Rust development with Nix
[https://fasterthanli.me/series/building-a-rust-service-with-nix](https://fasterthanli.me/series/building-a-rust-service-with-nix)
### Nix pills
[https://nixos.org/guides/nix-pills/](https://nixos.org/guides/nix-pills/)
### This presentation and examples
[https://code.nolog.cz/shine/nix_for_rustaceans](https://code.nolog.cz/shine/nix_for_rustaceans)

View file

@ -2,9 +2,9 @@
*@theme nix_talk *@theme nix_talk
*/ */
@import 'default'; @import "default";
section { section {
background: #cef; background: #cef;
color: #135; color: #135;
} }