···11----
22-title: komo's digital garden
33----
11+<div align="center">
22+ <img width=500 src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/footers/gray0_ctp_on_line.svg">
33+</div>
44+55+66+Welcome to my yapping place... :3
77+I put my quick notes, thoughts, and new-found knowledge in here.
88+### Quick links
4955-Welcome to my digital garden...
1010+- [[quick-notes/index|Quick Notes]]
···11+---
22+title: Nix Derivation Hash
33+tags:
44+ - quick-notes
55+ - quick-notes/nix
66+---
77+The Nix `hash` property on `mkDerivation`-alike function is an SRI of NAR (Nix Archive).
88+99+```mermaid
1010+flowchart LR
1111+ Store[/Nix Store/] --> NAR[Turn into NAR]
1212+ NAR --> Hash[Hash using sha256/sha512]
1313+ Hash --> SRI[Turn sha256/sha512 hash to SRI]
1414+ SRI --> Result[/SRI string/]
1515+```
1616+1717+In practice, it should look like this Nushell code below:
1818+```nushell
1919+encode nar ./path # Encode ./path as a NAR
2020+| hash sha256 -b # Hash using sha256
2121+| encode base64 # SRI process: Encode hash as a base64
2222+| ["sha256-" $in] | str join # SRI process: Complete the base64'd hash as SRI
2323+```
+33
content/quick-notes/opencl driver amd on nixos.md
···11+---
22+title: OpenCL driver for AMD Radeon on NixOS
33+tags:
44+ - quick-notes
55+ - quick-notes/nix
66+ - quick-notes/nixos
77+---
88+> [!info] Information maybe outdated
99+1010+Enable the `amdgpu` in the kernel modules via `boot.initrd.kernelModules` option:
1111+```nix {2}
1212+{
1313+ boot.initrd.kernelModules = [ "amdgpu" ];
1414+}
1515+```
1616+1717+And then, add `rocmPackages.clr.icd` to `hardware.graphics.extraPackages` option:
1818+```nix {3}
1919+{
2020+ hardware.graphics.extraPackages = with pkgs; [
2121+ rocmPackages.clr.icd
2222+ ];
2323+}
2424+```
2525+2626+To check whether the OpenCL driver is installed successfully, try `clinfo --list`.
2727+The output should look like this:
2828+```
2929+3030+Platform #0: AMD Accelerated Parallel Processing
3131+ `-- Device #0: (whatever)
3232+3333+```
+1-1
docs/authoring content.md
···22title: Authoring Content
33---
4455-All of the content in your Quartz should go in the `/content` folder. The content for the home page of your Quartz lives in `content/index.md`. If you've [[index#🪴 Get Started|setup Quartz]] already, this folder should already be initialized. Any Markdown in this folder will get processed by Quartz.
55+All of the content in your Quartz should go in the `/content` folder. The content for the home page of your Quartz lives in `content/index.md`. If you've [[docs/index#🪴 Get Started|setup Quartz]] already, this folder should already be initialized. Any Markdown in this folder will get processed by Quartz.
6677It is recommended that you use [Obsidian](https://obsidian.md/) as a way to edit and maintain your Quartz. It comes with a nice editor and graphical interface to preview, edit, and link your local files and attachments.
88
+1-1
docs/build.md
···22title: "Building your Quartz"
33---
4455-Once you've [[index#🪴 Get Started|initialized]] Quartz, let's see what it looks like locally:
55+Once you've [[docs/index#🪴 Get Started|initialized]] Quartz, let's see what it looks like locally:
6677```bash
88npx quartz build --serve
+1-1
docs/setting up your GitHub repository.md
···22title: Setting up your GitHub repository
33---
4455-First, make sure you have Quartz [[index#🪴 Get Started|cloned and setup locally]].
55+First, make sure you have Quartz [[docs/index#🪴 Get Started|cloned and setup locally]].
6677Then, create a new repository on GitHub.com. Do **not** initialize the new repository with `README`, license, or `gitignore` files.
88