refactor, nix flake

This commit is contained in:
Laureηt 2023-12-13 18:16:04 +01:00
commit aa9e770ba3
Signed by: Laurent
SSH key fingerprint: SHA256:kZEpW8cMJ54PDeCvOhzreNr4FSh6R13CMGH/POoO8DI
14 changed files with 273 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
result

3
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,3 @@
{
"markdown.marp.enableHtml": true,
}

BIN
figs/centrale.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 MiB

BIN
figs/chernobyl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

BIN
figs/church.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

BIN
figs/doha-kiev.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

BIN
figs/hero.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

BIN
figs/kiev-chernobyl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 KiB

BIN
figs/liqueur.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,020 KiB

BIN
figs/salo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

BIN
figs/tokyo-doha.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 KiB

64
flake.lock Normal file
View file

@ -0,0 +1,64 @@
{
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1701473968,
"narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1702312524,
"narHash": "sha256-gkZJRDBUCpTPBvQk25G0B7vfbpEYM5s5OZqghkjZsnE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a9bf124c46ef298113270b1f84a164865987a91c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1701253981,
"narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

35
flake.nix Normal file
View file

@ -0,0 +1,35 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = inputs@{ nixpkgs, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" "aarch64-linux" ];
perSystem = { pkgs, system, ... }: {
devShells.default =
pkgs.mkShell { packages = with pkgs; [ marp-cli ]; };
packages.slides = pkgs.stdenvNoCC.mkDerivation {
name = "slides";
src = ./.;
dontUnpack = true;
buildInputs = with pkgs; [ marp-cli ];
buildPhase = ''
marp --html $src/slides.md --allow-local-files -o slides.html
'';
installPhase = ''
mkdir -p $out
cp -r $src/figs $out/figs
cp slides.html $out/index.html
'';
};
};
};
}

170
slides.md Normal file
View file

@ -0,0 +1,170 @@
---
marp: true
---
<style>
p, h1 {
-webkit-writing-mode: vertical-rl;
-moz-writing-mode: vertical-rl;
-ms-writing-mode: vertical-rl;
writing-mode: vertical-rl;
}
section {
padding: 2em;
align-items: center;
}
</style>
<h1>
わたしたちのまちは <br>
チョルノーブィリです!
</h1>
![bg left:80%](figs/hero.jpeg)
<!--
watashitachi no machi wa
chorunōbiri desu
-->
<!--
Notre ville est
chernobyl !
-->
---
チョルノーブィリは
ウクライナの北です。
![bg right:80%](figs/chernobyl.png)
<!--
chorunōbiri wa
ukuraina no kita desu
-->
<!--
chernobyl est
au sud de l'ukraine
-->
---
とうきょうからドーハまで
ひこうきでじゅうさんじかん
くらいです。
![bg left:80%](figs/tokyo-doha.png)
<!--
tōkyō kara dōha made
hikōki de jusanjikan
kurai desu.
-->
<!--
de tokoyo à doha
il y a environ 13 heures d'avion
-->
---
ドーハからキエフまで
ひこうきでごじかん
よんじゅうごふん
くらいです。
![bg right:80%](figs/doha-kiev.png)
<!--
dōha kara Kiefu made
hikōki de gojikan
yonjugofun
kurai desu.
-->
<!--
De doha à kiev
il y a environ 5 heures
45 minutes d'avion
-->
---
キエフからチョルノーブィリまで
くるまでにじかん
くらいです。
![bg left:80%](figs/kiev-chernobyl.png)
<!--
Kiefu kara chorunōbiri made
kuruma de nijikan
kurai desu.
-->
---
ちいさいゆうえんちがあります。<br>
ゆうえんちにかんらんしゃと
バンパーカーがあります。
![bg right:80%](https://images.unsplash.com/photo-1563881087891-b87cdd6072dc)
![bg right:80%](https://images.unsplash.com/photo-1548341050-9f6f83e408c7)
<!--
chiisai yuuenchi ga arimasu.
Yūenchi nikan ransha to
bumper car ga arimasu.
-->
---
オーソドックスのきょうかいがあります。
サンエリアスはあおくてきれいです。
![bg left:80%](figs/church.jpg)
<!--
o-sodokkusu no kyōkai ga arimasu.
saint elias wa ao kute kirei desu.
-->
---
げんしりょくはつでんしょはゆうめくて
ふるくてやばいです。
![bg right:80%](figs/centrale.jpeg)
<!--
genshirokuhatsudensho wa
yuumekute
furukute
yabai desu.
-->
---
サロはぶたにくです。
とてもしおからいです。
![bg left:80%](figs/salo.jpg)
<!--
salo wa buta niku desu.
totemo shiokarai desu.
-->
---
ナリヴカはつよいさけです。
ラプスベリーとチェリーのさけです。
![bg right:80%](figs/liqueur.jpg)
<!--
narivuka wa tsuyoi sake desu.
rapusuberi- to cherry- no sake desu.
-->