From 74b771e62ce5b8e39f29d90e5c6467ff65b96aca Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Sat, 9 Sep 2023 09:57:06 +0200 Subject: [PATCH] finalish slides --- .../nixcon2023/demo-config/configuration.nix | 9 ++ content/posts/nixcon2023/index.md | 3 +- .../nixcon2023/slides/.yarn/install-state.gz | Bin 1392 -> 1436 bytes .../posts/nixcon2023/slides/dynamic-demo.mp4 | 3 + content/posts/nixcon2023/slides/index.html | 81 ++++++++++++++---- content/posts/nixcon2023/slides/main.js | 3 + content/posts/nixcon2023/slides/nix-ctags.mp4 | 3 + content/posts/nixcon2023/slides/nixd.mp4 | 3 + .../posts/nixcon2023/slides/nixos-ctags.mp4 | 3 + .../posts/nixcon2023/slides/nixos-repl.mp4 | 3 + content/posts/nixcon2023/slides/styles.css | 11 +++ 11 files changed, 102 insertions(+), 20 deletions(-) create mode 100644 content/posts/nixcon2023/demo-config/configuration.nix create mode 100644 content/posts/nixcon2023/slides/dynamic-demo.mp4 create mode 100644 content/posts/nixcon2023/slides/nix-ctags.mp4 create mode 100644 content/posts/nixcon2023/slides/nixd.mp4 create mode 100644 content/posts/nixcon2023/slides/nixos-ctags.mp4 create mode 100644 content/posts/nixcon2023/slides/nixos-repl.mp4 diff --git a/content/posts/nixcon2023/demo-config/configuration.nix b/content/posts/nixcon2023/demo-config/configuration.nix new file mode 100644 index 0000000..ce4ec65 --- /dev/null +++ b/content/posts/nixcon2023/demo-config/configuration.nix @@ -0,0 +1,9 @@ +{ pkgs, config, ... }: { + programs.fish.enable = true; + + fileSystems."/" = { + device = "/dev/sda1"; + }; + boot.loader.grub.enable = false; + system.stateVersion = "23.05"; +} diff --git a/content/posts/nixcon2023/index.md b/content/posts/nixcon2023/index.md index 1fea700..b9049bd 100644 --- a/content/posts/nixcon2023/index.md +++ b/content/posts/nixcon2023/index.md @@ -1,9 +1,10 @@ +++ title = "NixCon 2023: Finding things in nixpkgs and NixOS source" path = "/nixcon2023" -draft = true +draft = false tags = ["nix", "nixcon"] date = "2023-09-09" +++ +Slides here: diff --git a/content/posts/nixcon2023/slides/.yarn/install-state.gz b/content/posts/nixcon2023/slides/.yarn/install-state.gz index 930762313bcb3baf8c40eef64e708668d30bb8c4..a2595aa6a998226f9a5a0fdc92c532bdeb03a942 100644 GIT binary patch delta 1326 zcmeysHHW)izMF#q44AJ*MCOaQ3&b7ZGgoBMtdw&-)~!0$ zeBF5UT+<_)ls=xHEVX_k57QL(C3jCqW%k`$_v%;Qx^MRPzny)%O?sNa?2k!1>J4;$ z|7G9Mviq#QyD$6iJ3h13Z9hJq$CqaF=U-h$@$yP#`wafy>t@c{|2r+ZZpVY&XLlD* z>~Zlra>*z(%qnbMZE>dju5FuAuEc2MmX}*)>hbN!cz)XPUH>`r=-+P}YKy1-kJ4k9 z-hV6a=Z2m8xDW5$ws>3h*V_;OJiJ&b`QzOjx5&v-jE?mZ9XBkv))XIIzhl!q~+|A14l(6B+o%!+Pjfc-S zW_c+T-fsOvb+BaTXgyViL=^F3j~T zo_vdu#l-6OCpY`}-aX|P&b|0?wfy*|W$b&B=J4#<&G_Nl*{9QXMB6nbmisKf_9mjS z&`fA@q3J|5zXXNsnUf|@+9AP`Dq15J^~C9-@(zXK=}J#kD>GH@=6sT<-(DfU=2PQ= zX#!rN0-P=8Pn6szmy{`7ah&dGr($UT=J}dgYXhT%_n7&lO)hg1p2rguYNdPccg^*+ zeQ#My*6-N)Yg_yq-eQM&?__ellNKZ$I^gIbUaGaTV1tOy7bz{4o&aAhvC@wVwNe-L z%E@FeZf)aQ$yMwb;K87%&8&93t3LE}R6y$ymq5nIGN+pdR6N!FZ&uAb*RCV@)_q6R z{1h%d!GI+*a|AQf#2Sjud1^h_^Jis7=c+;_X@#jt=k_g{Dx~7)*PW8`^p>PEtI8U) zO?As%wE}mZ5!4h-%{8%8SMN5m4D1b*PR+JBD7s!py?ydeuCvJ zPrvA!vFdA3wV~mm*ZyDvEyEx>%74% zv;U2=KtX7rQmSZH;eu9;Kz3Qz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i>#)wazG4b{wnAm6XJpJ)vB^Cv z-76YYJrd8Pa$Hk;JF%9-X_1!Ko>fk|d|Nn_UM*Ps!zem(M?<>m3Ds|NFV6CsG-2PP zEB-;da$c+pdS!m~>m^)J>tN$BqXB{bj0;_J!c z1GN>0wG$`lFV5Rp9`>?+z1Kx0&DhFwvUL$VOtzoP*LhtPoV)7T>y=NQE-d()bLZ^Z z!+HB(-!DD;HuLt|{gayaL{|TN{%-ZNcdni`C(Mr+ziScB@mJmS=F;P@{MrRR`~C&4 zE0Z>U_VZk7h1%o24}%T|#~rxw<3rZ@&*JIduRdnip3oidqgr&e?zEl1-p%**=OVi1 zgeXlvQ~v9>^XIjtwjWcU+y4A|^xX0}=3cKqzskL-enGr!>CQ#FQWt+0yn1r#Gv=$k z`@_9UgGzEZdVcSIJ4ODz;XD3z_NJwpOXhZ;Og428JmBfu7StLh5^yw6&1H&3V^hr5 z@~f+wf~Ix~KYgL1esxysg4I_&@ARp>$m}&bm&K~c@&D8_t9f%7m*`hc5g&Hk+WnvLQnQ} @@ -101,8 +102,12 @@ dev/nixpkgs ยป tokei -t nix . # Static analysis * Any method that takes 15 seconds or less and doesn't involve running any code -* I am showing the fancy ways of doing it - * ripgrep is static analysis too; it's a good fallback +* First way to try: + * Extremely fast + * Objective: "works most of the time" +* I am showing the fancy ways of doing it here + * ripgrep is static analysis too + * Objective of fancy ways: faster and less stuff to sort through @@ -118,8 +123,7 @@ Good for: Limitations: * does not eval everything * needs some setup per-project -* completions are imperfect but they exist -* not sure how to get goto definition to go past args for some things +* imperfect go-to-definition @@ -145,10 +149,10 @@ Install from nixpkgs and configure in your editor. Then: -
@@ -158,11 +162,11 @@ FIXME * Very old and simple source code index format * Usually gets through abstraction by being too naive to get broken * Typically generated by simple parse-tree traversal -* Wide editor support ([VSCode extension](https://marketplace.visualstudio.com/items?itemName=jaydenlin.ctags-support), built into vim/emacs) +* Wide editor support ([VSCode extension](https://marketplace.visualstudio.com/items?itemName=jaydenlin.ctags-support); also built into vim/emacs) Sample: -``` +```text boot.initrd.luks.reusePassphrases nixos/modules/system/boot/luksroot.nix 533 ``` @@ -173,19 +177,21 @@ boot.initrd.luks.reusePassphrases nixos/modules/system/boot/luksroot.nix # ctags on nix * `nix-doc tags .` in nixpkgs, then in vim you can `:tj fixedPoints`, `C-]`, etc. -* [WIP ctags for NixOS options](https://github.com/NixOS/nixpkgs/pull/249243) +* [WIP ctags for NixOS options (#249243)](https://github.com/NixOS/nixpkgs/pull/249243) -
@@ -264,6 +270,7 @@ null + + +
+
+ +
+
+
+ +
@@ -326,14 +353,14 @@ FIXME Getting the configuration into the repl: * Non-flakes: `nix repl -I nixos-config=/path/to/configuration.nix -f <nixpkgs/nixos>` -* Flakes: `nix repl`, `:lf .`, `nixosConfigurations.xx.{....}` +* Flakes: `nix repl` then `:lf .` then `nixosConfigurations.xx.{....}` -
+
+ + diff --git a/content/posts/nixcon2023/slides/main.js b/content/posts/nixcon2023/slides/main.js index 2c81db9..e9a4aa5 100644 --- a/content/posts/nixcon2023/slides/main.js +++ b/content/posts/nixcon2023/slides/main.js @@ -11,4 +11,7 @@ Reveal.initialize({ transitionSpeed: "fast", transition: "none", slideNumber: true, + + margin: 0.04, + disableLayout: true, }); diff --git a/content/posts/nixcon2023/slides/nix-ctags.mp4 b/content/posts/nixcon2023/slides/nix-ctags.mp4 new file mode 100644 index 0000000..60a2eae --- /dev/null +++ b/content/posts/nixcon2023/slides/nix-ctags.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e1b340b4499a892019adace12d3ac8ef5ce88df1d718c7bdd986ba808776591 +size 1727949 diff --git a/content/posts/nixcon2023/slides/nixd.mp4 b/content/posts/nixcon2023/slides/nixd.mp4 new file mode 100644 index 0000000..faed40f --- /dev/null +++ b/content/posts/nixcon2023/slides/nixd.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5693abfc18f2cf1e984feebbb6e62c0a051b0ea6c580a18dbb44ec9b21b13eac +size 818732 diff --git a/content/posts/nixcon2023/slides/nixos-ctags.mp4 b/content/posts/nixcon2023/slides/nixos-ctags.mp4 new file mode 100644 index 0000000..244470d --- /dev/null +++ b/content/posts/nixcon2023/slides/nixos-ctags.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba82574fa36bb9348c5f144a81b87127c7305c63ab6bf9a6a9b270b84ef77f8f +size 576676 diff --git a/content/posts/nixcon2023/slides/nixos-repl.mp4 b/content/posts/nixcon2023/slides/nixos-repl.mp4 new file mode 100644 index 0000000..4c7ccc4 --- /dev/null +++ b/content/posts/nixcon2023/slides/nixos-repl.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:762c43a6fa9bf8f4e4f998eb952755e40d93b9d53c539944b9f2035873c4f7da +size 1422862 diff --git a/content/posts/nixcon2023/slides/styles.css b/content/posts/nixcon2023/slides/styles.css index 27f7f29..4364fb9 100644 --- a/content/posts/nixcon2023/slides/styles.css +++ b/content/posts/nixcon2023/slides/styles.css @@ -1,3 +1,14 @@ +.slides { + display: flex; + /*! flex: max-content; */ + align-items: center; + justify-content: center; +} + +.slides section:not(.video) { + max-width: var(--slide-width); +} + :root { --r-heading-text-transform: none !important; --r-background-color: #190022 !important;