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 9307623..a2595aa 100644 Binary files a/content/posts/nixcon2023/slides/.yarn/install-state.gz and b/content/posts/nixcon2023/slides/.yarn/install-state.gz differ diff --git a/content/posts/nixcon2023/slides/dynamic-demo.mp4 b/content/posts/nixcon2023/slides/dynamic-demo.mp4 new file mode 100644 index 0000000..641d3bd --- /dev/null +++ b/content/posts/nixcon2023/slides/dynamic-demo.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:55f1cb458194635ee01acc93463beba3246ddbfa7c1a1aaa59f26eb28f210889 +size 1419413 diff --git a/content/posts/nixcon2023/slides/index.html b/content/posts/nixcon2023/slides/index.html index 091b6bf..2b164b3 100644 --- a/content/posts/nixcon2023/slides/index.html +++ b/content/posts/nixcon2023/slides/index.html @@ -58,10 +58,11 @@
@@ -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;