slide updates, links
This commit is contained in:
parent
814f89e0f8
commit
c354515db6
8 changed files with 59 additions and 22 deletions
1
assets/pictures/nix_pills.svg
Normal file
1
assets/pictures/nix_pills.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 22 KiB |
1
assets/pictures/qrcode_fasterthanli-me.svg
Normal file
1
assets/pictures/qrcode_fasterthanli-me.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 23 KiB |
1
assets/pictures/this_presentation.svg
Normal file
1
assets/pictures/this_presentation.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 15 KiB |
|
@ -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
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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
|
|
||||||
|
|
|
@ -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
|
||||||
|
@ -75,7 +83,7 @@ _paginate: false
|
||||||
- builds all flake dependencies, but not the flake itself
|
- builds all flake dependencies, but not the flake itself
|
||||||
- sets up the development environment
|
- sets up the development environment
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# Nix direnv
|
# Nix direnv
|
||||||
|
|
||||||
|
@ -92,17 +100,23 @@ _paginate: false
|
||||||
|
|
||||||
<!-- Both are fairly lightweight and remove boilerplate. -->
|
<!-- Both are fairly lightweight and remove boilerplate. -->
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# 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 = {
|
||||||
|
@ -195,7 +213,8 @@ outputs = inputs @ {
|
||||||
- Plenty of other tools for your disposal
|
- Plenty of other tools for your disposal
|
||||||
- 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;
|
||||||
|
@ -205,4 +224,14 @@ outputs = inputs @ {
|
||||||
Cmd = [ "${crateOutputs.packages.release}/bin/my-crate" ];
|
Cmd = [ "${crateOutputs.packages.release}/bin/my-crate" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# 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)
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
*@theme nix_talk
|
*@theme nix_talk
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@import 'default';
|
@import "default";
|
||||||
|
|
||||||
section {
|
section {
|
||||||
background: #cef;
|
background: #cef;
|
||||||
color: #135;
|
color: #135;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue