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 =
inputs@{ flake-parts, nci, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ];
systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
imports = [
nci.flakeModule
./crates.nix

View file

@ -33,6 +33,7 @@
{
treefmt = {
programs.nixfmt.enable = true;
programs.prettier.enable = true;
projectRootFile = "flake.nix";
};
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} */
const config = {
allowLocalFiles: true,
themeSet: 'themes',
url: canonicalUrl,
inputDir: "./slides",
output: "./present"
allowLocalFiles: true,
themeSet: "themes",
url: canonicalUrl,
inputDir: "./slides",
output: "./present",
};
}
export default config
export default config;

View file

@ -1,15 +1,15 @@
---
marp: true
lang: en-US
title: Marp CLI example
description: Hosting Marp slide deck on the web
title: Reproducible development environments with Nix
theme: nix_talk
transition: fade
paginate: true
_paginate: false
---
# Nix for Rustaceans
# Reproducible development environments with Nix
#### Kateřina "Kate" Churanová
---
@ -18,7 +18,6 @@ _paginate: false
- Purely functional programming language
- Package manager
- Linux distribution (NixOS)
- multiplatform (Linux, Mac OS, BSD-ish)
---
@ -29,6 +28,15 @@ _paginate: false
- Well documented
- 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
@ -95,14 +103,20 @@ _paginate: false
---
# Flake parts - Minimal modular framework
## Dev environment management
- Devshell
- Devenv
## Rust project building
- NCI (Nix cargo integration)
---
# Basic flake parts project
```nix
{
inputs = {
@ -126,7 +140,9 @@ _paginate: false
---
# Fun begins with Rust
### flake.nix
```nix
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
@ -170,7 +186,9 @@ outputs = inputs @ {
```
---
### crates.nix
```nix
{...}: {
perSystem = {
@ -196,6 +214,7 @@ outputs = inputs @ {
- Extremely simple generation of lightweight OCI containers
---
```nix
packages.container = pkgs.dockerTools.streamLayeredImage {
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
*/
@import 'default';
@import "default";
section {
background: #cef;
color: #135;
background: #cef;
color: #135;
}