My digital garden

sync

+94 -10
+12
content/assets/banner.svg
··· 1 + <svg width="600" height="75" viewBox="0 0 600 75" version="1.1" xmlns="http://www.w3.org/2000/svg" style="stroke-linecap: round; stroke-linejoin: round; stroke-miterlimit: 1.5;"> 2 + <path transform="matrix(1,0,0,1,92.3579,4.11772)" d="M105.809,48.397C105.809,44.506 102.473,43.931 102.473,33.503" style="fill: none; stroke: rgb(110, 108, 126); stroke-width: 1.5px;"/> 3 + <path transform="matrix(1,0,0,1,92.3579,4.11772)" d="M109.397,38.324L109.397,48.321" style="fill: none; stroke: rgb(110, 108, 126); stroke-width: 1.5px;"/> 4 + <path transform="matrix(1,0,0,1,92.3579,4.11772)" d="M112.883,48.152C112.883,44.717 115.053,40.554 115.053,35.084C115.053,29.613 114.393,24.795 114.216,21.81" style="fill: none; stroke: rgb(110, 108, 126); stroke-width: 1.5px;"/> 5 + <path transform="matrix(1,0,0,1,92.3579,4.11772)" d="M112.951,22.241C112.951,22.241 116.335,21.976 117.504,16.695" style="fill: none; stroke: rgb(110, 108, 126); stroke-width: 1.5px;"/> 6 + <path transform="matrix(1,0,0,1,92.3579,4.11772)" d="M107.788,11.843C107.788,11.843 106.369,7.434 105.169,7.434C103.969,7.434 101.87,13.187 101.87,21.862C101.87,24.103 90.181,29.985 92.659,43.571C93.057,45.751 94.053,49.908 94.053,49.924C94.053,49.94 96.571,59.453 91.184,59.453C90.063,59.453 89.526,58.833 88.405,58.833C87.285,58.833 86.381,59.598 86.381,60.591C86.381,61.584 87.491,64.025 91.446,64.025C98.593,64.025 98.865,58.038 98.865,54.158C98.865,50.278 98.829,51.479 98.829,50.844C98.829,48.717 100.601,48.284 101.259,48.043" style="fill: none; stroke: rgb(110, 108, 126); stroke-width: 1.5px;"/> 7 + <ellipse transform="matrix(1.00474,-0.404483,0.370766,0.920982,85.4108,49.8267)" cx="111.892" cy="15.766" rx="1.032" ry="1.449" style="fill: rgb(47, 44, 62);"/> 8 + <path transform="matrix(1,0,0,1,92.3579,4.11772)" d="M110.074,10.347C113.617,10.347 114.448,14.635 117.14,14.635" style="fill: none; stroke: rgb(110, 108, 126); stroke-width: 1.5px;"/> 9 + <path transform="matrix(1,0,0,1,92.3579,4.11772)" d="M112.568,9.074C112.568,9.074 111.553,6.74 110.677,6.74C109.801,6.74 108.537,9.169 108.537,9.169" style="fill: none; stroke: rgb(110, 108, 126); stroke-width: 1.5px;"/> 10 + <path transform="matrix(3.96613,0,0,5.89452,-177.012,-336.835)" d="M93.717,66.428L195.647,66.428" style="fill: none; stroke: rgb(110, 108, 126); stroke-width: 0.3px;"/> 11 + <path transform="matrix(1.78906,0,0,2.78204,-166.7,-130.078)" d="M93.717,66.428L195.647,66.428" style="fill: none; stroke: rgb(110, 108, 126); stroke-width: 0.64px;"/> 12 + </svg>
+9 -4
content/index.md
··· 1 - --- 2 - title: komo's digital garden 3 - --- 1 + <div align="center"> 2 + <img width=500 src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/footers/gray0_ctp_on_line.svg"> 3 + </div> 4 + 5 + 6 + Welcome to my yapping place... :3 7 + I put my quick notes, thoughts, and new-found knowledge in here. 8 + ### Quick links 4 9 5 - Welcome to my digital garden... 10 + - [[quick-notes/index|Quick Notes]]
+3
content/quick-notes/index.md
··· 1 + --- 2 + title: Quick Notes 3 + ---
+23
content/quick-notes/nix derivation hash.md
··· 1 + --- 2 + title: Nix Derivation Hash 3 + tags: 4 + - quick-notes 5 + - quick-notes/nix 6 + --- 7 + The Nix `hash` property on `mkDerivation`-alike function is an SRI of NAR (Nix Archive). 8 + 9 + ```mermaid 10 + flowchart LR 11 + Store[/Nix Store/] --> NAR[Turn into NAR] 12 + NAR --> Hash[Hash using sha256/sha512] 13 + Hash --> SRI[Turn sha256/sha512 hash to SRI] 14 + SRI --> Result[/SRI string/] 15 + ``` 16 + 17 + In practice, it should look like this Nushell code below: 18 + ```nushell 19 + encode nar ./path # Encode ./path as a NAR 20 + | hash sha256 -b # Hash using sha256 21 + | encode base64 # SRI process: Encode hash as a base64 22 + | ["sha256-" $in] | str join # SRI process: Complete the base64'd hash as SRI 23 + ```
+33
content/quick-notes/opencl driver amd on nixos.md
··· 1 + --- 2 + title: OpenCL driver for AMD Radeon on NixOS 3 + tags: 4 + - quick-notes 5 + - quick-notes/nix 6 + - quick-notes/nixos 7 + --- 8 + > [!info] Information maybe outdated 9 + 10 + Enable the `amdgpu` in the kernel modules via `boot.initrd.kernelModules` option: 11 + ```nix {2} 12 + { 13 + boot.initrd.kernelModules = [ "amdgpu" ]; 14 + } 15 + ``` 16 + 17 + And then, add `rocmPackages.clr.icd` to `hardware.graphics.extraPackages` option: 18 + ```nix {3} 19 + { 20 + hardware.graphics.extraPackages = with pkgs; [ 21 + rocmPackages.clr.icd 22 + ]; 23 + } 24 + ``` 25 + 26 + To check whether the OpenCL driver is installed successfully, try `clinfo --list`. 27 + The output should look like this: 28 + ``` 29 + 30 + Platform #0: AMD Accelerated Parallel Processing 31 + `-- Device #0: (whatever) 32 + 33 + ```
+1 -1
docs/authoring content.md
··· 2 2 title: Authoring Content 3 3 --- 4 4 5 - 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. 5 + 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. 6 6 7 7 It 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. 8 8
+1 -1
docs/build.md
··· 2 2 title: "Building your Quartz" 3 3 --- 4 4 5 - Once you've [[index#🪴 Get Started|initialized]] Quartz, let's see what it looks like locally: 5 + Once you've [[docs/index#🪴 Get Started|initialized]] Quartz, let's see what it looks like locally: 6 6 7 7 ```bash 8 8 npx quartz build --serve
+1 -1
docs/setting up your GitHub repository.md
··· 2 2 title: Setting up your GitHub repository 3 3 --- 4 4 5 - First, make sure you have Quartz [[index#🪴 Get Started|cloned and setup locally]]. 5 + First, make sure you have Quartz [[docs/index#🪴 Get Started|cloned and setup locally]]. 6 6 7 7 Then, create a new repository on GitHub.com. Do **not** initialize the new repository with `README`, license, or `gitignore` files. 8 8
+1 -1
quartz.config.ts
··· 9 9 dark: "#b4d2f0", 10 10 secondary: "#74a5e7", 11 11 tertiary: "#3c8de0", 12 - highlight: "#5b99e4", 12 + highlight: "#365378", 13 13 textHighlight: "#5b99e4", 14 14 }; 15 15
+10 -2
quartz.layout.ts
··· 21 21 component: Component.Breadcrumbs(), 22 22 condition: (page) => page.fileData.slug !== "index", 23 23 }), 24 - Component.ArticleTitle(), 25 - Component.ContentMeta(), 24 + Component.ConditionalRender({ 25 + component: Component.ArticleTitle(), 26 + condition: page => !page.fileData.filePath?.endsWith("content/index.md"), 27 + }), 28 + Component.ConditionalRender({ 29 + component: Component.ContentMeta({ 30 + showReadingTime: true, 31 + }), 32 + condition: page => !page.fileData.filePath?.endsWith("content/index.md"), 33 + }), 26 34 Component.TagList(), 27 35 ], 28 36 left: [