From a6a3f943063ce04fd0fd3030c6f67711a7943bd4 Mon Sep 17 00:00:00 2001 From: Kumar Damani Date: Fri, 24 Jul 2026 00:25:00 -0400 Subject: preparing for switch to typst --- .env | 4 - .envrc | 4 - .gitignore | 3 - .gitmodules | 3 - .hugo_build.lock | 0 archetypes/default.md | 6 - content/_index.md | 134 ------ content/post/_index.md | 6 - content/post/framework-server-p2/current-lab.jpg | Bin 37401 -> 0 bytes content/post/framework-server-p2/ethernet.png | Bin 110306 -> 0 bytes content/post/framework-server-p2/index.md | 106 ----- content/post/framework-server-p2/server-front.png | Bin 87328 -> 0 bytes content/post/framework-server-p2/server-inside.png | Bin 221831 -> 0 bytes content/post/framework-server/bios.jpg | Bin 162196 -> 0 bytes content/post/framework-server/bios2.png | Bin 289613 -> 0 bytes content/post/framework-server/case.jpg | Bin 111978 -> 0 bytes content/post/framework-server/dmz.png | Bin 69096 -> 0 bytes content/post/framework-server/dns.jpg | Bin 59205 -> 0 bytes content/post/framework-server/dri.png | Bin 9650 -> 0 bytes content/post/framework-server/error.jpg | Bin 43548 -> 0 bytes content/post/framework-server/eth.jpg | Bin 107918 -> 0 bytes content/post/framework-server/fail.png | Bin 164105 -> 0 bytes content/post/framework-server/feelsbadman.png | Bin 32798 -> 0 bytes content/post/framework-server/fix1.png | Bin 23658 -> 0 bytes content/post/framework-server/fix2.png | Bin 67102 -> 0 bytes content/post/framework-server/fix3.png | Bin 27163 -> 0 bytes content/post/framework-server/fw1.png | Bin 29985 -> 0 bytes content/post/framework-server/fw2.png | Bin 15422 -> 0 bytes content/post/framework-server/imp.png | Bin 341529 -> 0 bytes content/post/framework-server/index.md | 487 --------------------- content/post/framework-server/lab.png | Bin 85363 -> 0 bytes content/post/framework-server/lan.png | Bin 87550 -> 0 bytes content/post/framework-server/mistakes.jpg | Bin 62973 -> 0 bytes content/post/framework-server/nas.jpg | Bin 139364 -> 0 bytes content/post/framework-server/net1.png | Bin 22726 -> 0 bytes content/post/framework-server/net2.png | Bin 21835 -> 0 bytes content/post/framework-server/network.png | Bin 55633 -> 0 bytes content/post/framework-server/pbr.png | Bin 14982 -> 0 bytes content/post/framework-server/pbr1.png | Bin 33683 -> 0 bytes content/post/framework-server/pbr2.png | Bin 8422 -> 0 bytes content/post/framework-server/pfnet.png | Bin 9831 -> 0 bytes content/post/framework-server/physical.png | Bin 79028 -> 0 bytes content/post/framework-server/port1.png | Bin 6063 -> 0 bytes content/post/framework-server/port2.png | Bin 44834 -> 0 bytes content/post/framework-server/rproxy.png | Bin 48318 -> 0 bytes content/post/framework-server/ups.jpg | Bin 151532 -> 0 bytes content/post/framework-server/vps.png | Bin 30087 -> 0 bytes content/post/framework-server/wg.png | Bin 23335 -> 0 bytes content/post/framework-server/wrtnet.png | Bin 57663 -> 0 bytes content/post/framework-server/wrtnet2.png | Bin 12214 -> 0 bytes content/post/framework-server/wtf.jpg | Bin 41867 -> 0 bytes content/post/listing-my-fav-advice/balance.jpg | Bin 18818 -> 0 bytes content/post/listing-my-fav-advice/boss.jpg | Bin 122736 -> 0 bytes content/post/listing-my-fav-advice/chewing.gif | Bin 735263 -> 0 bytes content/post/listing-my-fav-advice/index.md | 102 ----- content/post/listing-my-fav-advice/indulgence.jpg | Bin 78009 -> 0 bytes content/post/listing-my-fav-advice/money.jpg | Bin 21475 -> 0 bytes content/post/nas-upgrade/cockpit-lxc.png | Bin 72110 -> 0 bytes content/post/nas-upgrade/ethernet.png | Bin 110306 -> 0 bytes content/post/nas-upgrade/index.md | 139 ------ content/post/nas-upgrade/nas-chassis.png | Bin 72957 -> 0 bytes content/post/nas-upgrade/oldnas.png | Bin 89215 -> 0 bytes content/post/nas-upgrade/zfs-pool.png | Bin 79343 -> 0 bytes content/post/nixos-p1/boot.png | Bin 12893 -> 0 bytes content/post/nixos-p1/dwl.png | Bin 3082421 -> 0 bytes content/post/nixos-p1/fox.jpg | Bin 30886 -> 0 bytes content/post/nixos-p1/index.md | 385 ---------------- content/post/nixos-p1/rice.png | Bin 1670023 -> 0 bytes content/post/programming-as-art/code.png | Bin 530926 -> 0 bytes content/post/programming-as-art/index.md | 94 ---- content/post/programming-as-art/math.png | Bin 398307 -> 0 bytes content/post/programming-as-art/teaching.png | Bin 410632 -> 0 bytes content/post/programming-as-art/wand.png | Bin 356173 -> 0 bytes content/post/programs/dwl.png | Bin 3082421 -> 0 bytes content/post/programs/index.md | 92 ---- content/post/self-host/6imv05.jpg | Bin 66020 -> 0 bytes content/post/self-host/elections.jpg | Bin 97041 -> 0 bytes content/post/self-host/freedom.jpg | Bin 300014 -> 0 bytes content/post/self-host/index.md | 125 ------ content/post/self-host/office.png | Bin 1443597 -> 0 bytes content/post/self-host/police.jpg | Bin 190074 -> 0 bytes content/post/self-host/why.jpg | Bin 110502 -> 0 bytes deploy.sh | 5 - flake.lock | 471 -------------------- flake.nix | 24 - hugo.toml | 94 ---- layouts/partials/head.html | 18 - layouts/partials/helpers/katex.html | 14 - static/KumarDamaniCV.pdf | Bin 341365 -> 0 bytes static/btc.png | Bin 16887 -> 0 bytes static/css/custom.css | 44 -- static/fonts/zilla/ZillaSlab-Bold.ttf | Bin 248052 -> 0 bytes static/fonts/zilla/ZillaSlab-BoldItalic.ttf | Bin 255272 -> 0 bytes static/fonts/zilla/ZillaSlab-Italic.ttf | Bin 252876 -> 0 bytes static/fonts/zilla/ZillaSlab-Light.ttf | Bin 239836 -> 0 bytes static/fonts/zilla/ZillaSlab-LightItalic.ttf | Bin 245200 -> 0 bytes static/fonts/zilla/ZillaSlab-Medium.ttf | Bin 242964 -> 0 bytes static/fonts/zilla/ZillaSlab-MediumItalic.ttf | Bin 251916 -> 0 bytes static/fonts/zilla/ZillaSlab-Regular.ttf | Bin 244756 -> 0 bytes static/fonts/zilla/ZillaSlab-SemiBold.ttf | Bin 245152 -> 0 bytes static/fonts/zilla/ZillaSlab-SemiBoldItalic.ttf | Bin 252900 -> 0 bytes static/kd.jpeg | Bin 168026 -> 0 bytes static/xmr.png | Bin 15238 -> 0 bytes themes/risotto | 1 - 104 files changed, 2361 deletions(-) delete mode 100644 .env delete mode 100644 .envrc delete mode 100644 .gitmodules delete mode 100644 .hugo_build.lock delete mode 100644 archetypes/default.md delete mode 100644 content/_index.md delete mode 100644 content/post/_index.md delete mode 100644 content/post/framework-server-p2/current-lab.jpg delete mode 100644 content/post/framework-server-p2/ethernet.png delete mode 100644 content/post/framework-server-p2/index.md delete mode 100644 content/post/framework-server-p2/server-front.png delete mode 100644 content/post/framework-server-p2/server-inside.png delete mode 100644 content/post/framework-server/bios.jpg delete mode 100644 content/post/framework-server/bios2.png delete mode 100644 content/post/framework-server/case.jpg delete mode 100644 content/post/framework-server/dmz.png delete mode 100644 content/post/framework-server/dns.jpg delete mode 100644 content/post/framework-server/dri.png delete mode 100644 content/post/framework-server/error.jpg delete mode 100644 content/post/framework-server/eth.jpg delete mode 100644 content/post/framework-server/fail.png delete mode 100644 content/post/framework-server/feelsbadman.png delete mode 100644 content/post/framework-server/fix1.png delete mode 100644 content/post/framework-server/fix2.png delete mode 100644 content/post/framework-server/fix3.png delete mode 100644 content/post/framework-server/fw1.png delete mode 100644 content/post/framework-server/fw2.png delete mode 100644 content/post/framework-server/imp.png delete mode 100644 content/post/framework-server/index.md delete mode 100644 content/post/framework-server/lab.png delete mode 100644 content/post/framework-server/lan.png delete mode 100644 content/post/framework-server/mistakes.jpg delete mode 100644 content/post/framework-server/nas.jpg delete mode 100644 content/post/framework-server/net1.png delete mode 100644 content/post/framework-server/net2.png delete mode 100644 content/post/framework-server/network.png delete mode 100644 content/post/framework-server/pbr.png delete mode 100644 content/post/framework-server/pbr1.png delete mode 100644 content/post/framework-server/pbr2.png delete mode 100644 content/post/framework-server/pfnet.png delete mode 100644 content/post/framework-server/physical.png delete mode 100644 content/post/framework-server/port1.png delete mode 100644 content/post/framework-server/port2.png delete mode 100644 content/post/framework-server/rproxy.png delete mode 100644 content/post/framework-server/ups.jpg delete mode 100644 content/post/framework-server/vps.png delete mode 100644 content/post/framework-server/wg.png delete mode 100644 content/post/framework-server/wrtnet.png delete mode 100644 content/post/framework-server/wrtnet2.png delete mode 100644 content/post/framework-server/wtf.jpg delete mode 100644 content/post/listing-my-fav-advice/balance.jpg delete mode 100644 content/post/listing-my-fav-advice/boss.jpg delete mode 100644 content/post/listing-my-fav-advice/chewing.gif delete mode 100644 content/post/listing-my-fav-advice/index.md delete mode 100644 content/post/listing-my-fav-advice/indulgence.jpg delete mode 100644 content/post/listing-my-fav-advice/money.jpg delete mode 100644 content/post/nas-upgrade/cockpit-lxc.png delete mode 100644 content/post/nas-upgrade/ethernet.png delete mode 100644 content/post/nas-upgrade/index.md delete mode 100644 content/post/nas-upgrade/nas-chassis.png delete mode 100644 content/post/nas-upgrade/oldnas.png delete mode 100644 content/post/nas-upgrade/zfs-pool.png delete mode 100644 content/post/nixos-p1/boot.png delete mode 100644 content/post/nixos-p1/dwl.png delete mode 100644 content/post/nixos-p1/fox.jpg delete mode 100644 content/post/nixos-p1/index.md delete mode 100644 content/post/nixos-p1/rice.png delete mode 100644 content/post/programming-as-art/code.png delete mode 100644 content/post/programming-as-art/index.md delete mode 100644 content/post/programming-as-art/math.png delete mode 100644 content/post/programming-as-art/teaching.png delete mode 100644 content/post/programming-as-art/wand.png delete mode 100644 content/post/programs/dwl.png delete mode 100644 content/post/programs/index.md delete mode 100644 content/post/self-host/6imv05.jpg delete mode 100644 content/post/self-host/elections.jpg delete mode 100644 content/post/self-host/freedom.jpg delete mode 100644 content/post/self-host/index.md delete mode 100644 content/post/self-host/office.png delete mode 100644 content/post/self-host/police.jpg delete mode 100644 content/post/self-host/why.jpg delete mode 100755 deploy.sh delete mode 100644 flake.lock delete mode 100644 flake.nix delete mode 100644 hugo.toml delete mode 100644 layouts/partials/head.html delete mode 100644 layouts/partials/helpers/katex.html delete mode 100644 static/KumarDamaniCV.pdf delete mode 100644 static/btc.png delete mode 100644 static/css/custom.css delete mode 100644 static/fonts/zilla/ZillaSlab-Bold.ttf delete mode 100644 static/fonts/zilla/ZillaSlab-BoldItalic.ttf delete mode 100644 static/fonts/zilla/ZillaSlab-Italic.ttf delete mode 100644 static/fonts/zilla/ZillaSlab-Light.ttf delete mode 100644 static/fonts/zilla/ZillaSlab-LightItalic.ttf delete mode 100644 static/fonts/zilla/ZillaSlab-Medium.ttf delete mode 100644 static/fonts/zilla/ZillaSlab-MediumItalic.ttf delete mode 100644 static/fonts/zilla/ZillaSlab-Regular.ttf delete mode 100644 static/fonts/zilla/ZillaSlab-SemiBold.ttf delete mode 100644 static/fonts/zilla/ZillaSlab-SemiBoldItalic.ttf delete mode 100644 static/kd.jpeg delete mode 100644 static/xmr.png delete mode 160000 themes/risotto diff --git a/.env b/.env deleted file mode 100644 index 2f4b983..0000000 --- a/.env +++ /dev/null @@ -1,4 +0,0 @@ -AWS_BUCKET_NAME="kumar" -AWS_ENDPOINT="https://kumar.min.kumardamani.net" -AWS_UPLOAD_DIR="kumardamani.net" -AWS_LOCAL_DIR="public/" diff --git a/.envrc b/.envrc deleted file mode 100644 index 4a544bd..0000000 --- a/.envrc +++ /dev/null @@ -1,4 +0,0 @@ -if ! has nix_direnv_version || ! nix_direnv_version 3.0.5; then - source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.5/direnvrc" "sha256-RuwIS+QKFj/T9M2TFXScjBsLR6V3A17YVoEW/Q6AZ1w=" -fi -use flake .#website --impure diff --git a/.gitignore b/.gitignore index b33e988..92b2793 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1 @@ -public/ .direnv -.devenv -credentials diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index ff7ca04..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "themes/risotto"] - path = themes/risotto - url = https://github.com/joeroe/risotto.git diff --git a/.hugo_build.lock b/.hugo_build.lock deleted file mode 100644 index e69de29..0000000 diff --git a/archetypes/default.md b/archetypes/default.md deleted file mode 100644 index 00e77bd..0000000 --- a/archetypes/default.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: "{{ replace .Name "-" " " | title }}" -date: {{ .Date }} -draft: true ---- - diff --git a/content/_index.md b/content/_index.md deleted file mode 100644 index d52a325..0000000 --- a/content/_index.md +++ /dev/null @@ -1,134 +0,0 @@ -# About me -Hi. This is me: -{{< figure src="/kd.jpeg" alt="my pic" width="100" >}} - -My name is Kumar. Some people call me *kd*, or *ku-band-mar*, I'm known for being... - -* an advocate for de-centralization and self-hosting. [Why?](post/self-host) -* a programming purist, and a linguistics enthusiast. -* a recent amateur photographer. See some of my [pics](https://nc.kumardamani.net/apps/memories/a/vSk9IAWVUx2vcqphL9nMnLFmDQBDZWPr). -* 👎 on social-media. I think they lead to dystopia. [Read more](post/self-host#privacy). -* an NLP specialist from UofT. - -# My Active Projects -| | | -| -------------- | --------------- | -| [nixdots](https://gitlab.com/kdam0/dotfiles-nix) | My dotfiles for the Nix ecosystem as started in [this post](post/nixos-p1). | -| [home-lab](https://gitlab.com/kdam0/home-lab) | My Terraform, Ansible repository for self-hosting as described in [this post](post/framework-server). | -| [nccli](https://gitlab.com/kdam0/nccli) | A Docker-ized Golang CLI for CRUD ops for Namecheap's DNS settings. | - -> If you found something above to be useful, consider [sending](#donate) a few coins my way! - ---- - -# Professional Life -*Treat this section as an extension of my resume.* - -## 2020 - now -Currently working as a **DevOps** at [Kepler](https://kepler.space) :satellite:. - -This is mostly a software (infrastructure) dev gig for a start-up, which is a bit new to me -coming from a more traditional DevOps role with a mature company. -There is a ton of specialized *space* -related equipment here that present interesting problems in DevOps. - -I've learned a ton about embedded computers, networking and network automation, -which has opened my world up to all sorts of home projects for which I am very grateful for. -So far, I've been responsible for the following: - -* Establishing Infrastructure as Code (IaC) as standard practice with Ansible. -* Implementing a netboot infrastructure for our development servers - RPis - -using Packer, PXE, Awx (Ansible Tower) to keep them synced, predictable, and up-to-date. -* Built a custom Linux router to support our unique hardware testing requirements -for on-demand subnet generation/teardown for isolated tests. -* Automated our Lab network infrastructure with Ansible. -* Devised a test-automation framework using Django to facilitate reservation, -as well as [HIL](https://en.wikipedia.org/wiki/Hardware-in-the-loop_simulation) -(Hardware-In-the-Loop) testing to allow us to more reliably, and frequently test our HW. -* Designed and deployed our highly-available Kubernetes cluster to be our software -platform going forward. - -Beyond my work as an Individual Contributor (IC), I've also been responsible for instilling DevOps -*principles* within the team on our journey to maturity. - -## 2019 - 2020 -Worked as a **DevOps Engineer** at [AcuityAds](https://acuityads.com) in Toronto. -The main selling point for me to work here is that Acuity does not use -AWS, GCP or Azure etc. to host its infrastructure, it has its own on-prem 'cloud'. -This presents substantial challenges for us as DevOps Engineers that would normally be handled by a -public cloud provider. - -Apart from this, due to the nature of adtech, we deal with massive amounts of data, which forces -us to be very careful about the types of technologies we use (scale). -Here is a subset of what I've gained experience with during my time: - -* Infrastructure: VMWare, Physical -* Provisioning: Ansible, Terraform, Cobbler -* Containerization: Docker, Kubernetes -* CI/CD: Git, BitBucket, Bamboo (we host the entire Atlassian suite in-house) -* Monitoring: - * TICK (Telegraf, Influxdb, Chronograf, Kapacitor) - * ELK (Elasticsearch, Logstash, Kibana), with filebeat and metricbeat beats - * Prometheus - * Grafana - * Nagios, Pagerduty, Pingdom -* Data: MySql, Aerospike, Kafka, HDFS, Druid -* Scripting: Golang, Bash, Python. Some of my work can be on my Gitlab profile: - * Golang: - * a fast, containerized [cron script](https://gitlab.com/kdam0/go-druid-mysql-influx) - that interacts with Druid, MySql, and Influxdb written in Go. - Basic unit testing. - This is a job that powers one of our major alerting dashboards. - * a containerized highly modular [Rest Api](https://gitlab.com/kdam0/devops-api) - that writes to Influxdb. - This is something we run in K8S as a Service to monitor Cronjobs that run in K8S. - * Python: a [script](https://gitlab.com/kdam0/slack-to-teams) to migrate - Slack exports to MS Teams messages. - This is something we used when we gave up on Slack. - * Bash: a small [collection](https://gitlab.com/kdam0/random-shell-helpers) of helper - scripts that I used frequently for random things. - -## 2016 - 2017 -I worked at [Achiga](https://achiga.io) (formerly *WebCanada*) as -part of my [PEY](https://web.cs.toronto.edu/undergraduate/pey) (internship) -program from U of T for 12 months. As part of this, I was involved in: - -* A fast paced Agile environment where I was a Full Stack Developer working with - **PHP (Zend), MySql, and JavaScript**. -* Git + BitBucket + JIRA (basically the whole Atlassian suite), with Vagrant -* The Pipeline team working on day to day features and bugs in the CMS powering thousands of - local hotel sites around the world for Starwood Hotels. -* Debugging and optimizing cronjobs responsible for storing hotel rates in - our database which is critical to hotel revenue. -* Contributing to the Gallery Page (CMS as well as user facing UI). - See [Design Hotels Gallery Page](https://designhotels.com/gallery) - towards the end of my tenure. - -## 2014 - 2016 -I've worked on several other small-buisness type projects involving website designing, -and scripting over the years in between semesters. - ---- - -# Donate -
- Monero (XMR) -
- -``` -42hFshxmNoFZfAkDJTjSx9MUruMHdLTiDTE4efpP7xZTYwHMjwDZ6eJea2EnyBGGr5ab81cAovBxxT6KSvpUY5roUdkP1Qj -``` - -{{< figure src="/xmr.png" alt="xmr wallet qr code" width="100" >}} -
- -
- Bitcoin (BTC) -
- -``` -bc1q4em7f7mvl6wkzc8uyq4365td7w5n02uh64z2za -``` - -{{< figure src="/btc.png" alt="btc wallet qr code" width="100" >}} -
diff --git a/content/post/_index.md b/content/post/_index.md deleted file mode 100644 index 8a084d9..0000000 --- a/content/post/_index.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -aliases = ["posts", "articles", "blog", "showcase", "docs"] -title = "Posts" -author = "Hugo Authors" -tags = ["index"] -+++ diff --git a/content/post/framework-server-p2/current-lab.jpg b/content/post/framework-server-p2/current-lab.jpg deleted file mode 100644 index d64be2e..0000000 Binary files a/content/post/framework-server-p2/current-lab.jpg and /dev/null differ diff --git a/content/post/framework-server-p2/ethernet.png b/content/post/framework-server-p2/ethernet.png deleted file mode 100644 index f39110d..0000000 Binary files a/content/post/framework-server-p2/ethernet.png and /dev/null differ diff --git a/content/post/framework-server-p2/index.md b/content/post/framework-server-p2/index.md deleted file mode 100644 index 85b7aff..0000000 --- a/content/post/framework-server-p2/index.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: "Letting my Framework 13 be a laptop again" -date: 2024-06-03T13:43:05-04:00 -draft: false -description: "Graduating to a more conventional home-lab." -author: "Kumar Damani" ---- - -My process of converting my Framework server back into a laptop. - - - -My wife needs an upgrade from her 2015 MacBook Pro, -but shelling out a cool $1600 + tax for one of the shiny new *M* MacBooks -for the 16GB variant hardly seems an ideal proposition now that Apple -has relinquished consideration of its customers who -would prefer to amortize upgrades over the lifespan of a machine. -It seems that leaving the Mac platform is our only consumer-friendly option, -which avoids fighting a losing battle with Apple w.r.t. upgradability. - -> :wave: Framework has entered the chat. - -Meanwhile, Framework seems to have upheld its promise of providing a path -to long-term upgradability for its products. -The new Ryzen mainboards being compatible with my original Framework 13 -(2021) is an example of this. -So at this point, I'm far more inclined to commit to the Framework ecosystem -for my wife (and probably myself) than Apple. - -Other than the initial non-trivial pain of migrating her from macOS to Windows, -she should have a substantially better user-experience running all of the -Adobe crapware she wants on my old Framework. - -**The only problem is that my entire home-lab currently [runs on my Framework](/post/framework-server) 😰.** - -:shopping_cart: time! - -# The Pledge -We'll be using second-hand equipment as much as possible. After all, -the point of all this is to avoid spending $1600 on a new laptop. -So we should be well under that to make it worthwhile. - -I picked these up from eBay: - -![server front](server-front.png) -![ethernet adapter](ethernet.png) - -| Part | Price (shipped) | -| -------------- | --------------- | -| HP Z240 Workstation Intel Xeon 3.4GHz 16G RAM 180G SSD Nvidia K620 | $150 | -| Mellanox ConnectX-2 PCIe x8 10Gbe SFP+ network card | $23 | - -> My Framework currently has 32GB of memory, and while this is much less, -it will still be okay with my current utilization for my current workload. - -One nice thing about this case is that it would be possible to rack-mount this -workstation sideways on a standard rack shelf if I decided to go that -route in the future. - -Also, I don't presently have 10Gb networking equipment at home to plug -anything into that network card, but I'm getting it now for future-proofing. - -IPMI would have been nice-to-have, but I decided that for this price, and the -bonus of that Nvidia K620 was too good to pass up! This is an -immediate upgrade from my current integrated Iris GPU on my Framework server. - -![server inside](server-inside.png) - -All of my home-lab VMs, and LXC containers run within Proxmox. -So I set up a fresh Proxmox here. - -Fortunately for me, `lspci` showed all the hardware on the first go. -But to use (pass-through) the Nvidia GPU in my guests, -I need to first set up the Proxmox host. -See my git repo for what I did to make this work. - -# The Turn - -To make the migration of our services *less painful*, -we utilize Proxmox's migration features. -We just need to make sure our nodes are part of a cluster. - -**Create the cluster on the old node.** -Then, from the new node, we **join** the existing cluster. - -> Proxmox 8 will not let a node with existing guests join a cluster. - -# The Prestige - -Now it really is as easy as selecting a VM or an LXC container, hitting -the Migrate button, and watching your guest fly away to the new node! -For guests with large OS disks, it takes a little longer to copy over -since my network is slow. -Eventually, I will use Ceph-backed VM storage to make this a zero-downtime op. - -In a few minutes, I could knock out all of my services. -Refer to my gitlab project to see how I handled the Nvidia K60 pass-through -to my Nextcloud AIO instance and Plex guests. - -Here's what my "rack" looks like now: - -![current lab](current-lab.jpg) - -Once everything was back online, I powered down the old Framework server -and re-installed it back onto its laptop chassis, bought a W10 license, and -finished the rest of the installation. diff --git a/content/post/framework-server-p2/server-front.png b/content/post/framework-server-p2/server-front.png deleted file mode 100644 index 31e34da..0000000 Binary files a/content/post/framework-server-p2/server-front.png and /dev/null differ diff --git a/content/post/framework-server-p2/server-inside.png b/content/post/framework-server-p2/server-inside.png deleted file mode 100644 index 79e7139..0000000 Binary files a/content/post/framework-server-p2/server-inside.png and /dev/null differ diff --git a/content/post/framework-server/bios.jpg b/content/post/framework-server/bios.jpg deleted file mode 100644 index 76cda35..0000000 Binary files a/content/post/framework-server/bios.jpg and /dev/null differ diff --git a/content/post/framework-server/bios2.png b/content/post/framework-server/bios2.png deleted file mode 100644 index 094e37e..0000000 Binary files a/content/post/framework-server/bios2.png and /dev/null differ diff --git a/content/post/framework-server/case.jpg b/content/post/framework-server/case.jpg deleted file mode 100644 index a40c172..0000000 Binary files a/content/post/framework-server/case.jpg and /dev/null differ diff --git a/content/post/framework-server/dmz.png b/content/post/framework-server/dmz.png deleted file mode 100644 index 372c12b..0000000 Binary files a/content/post/framework-server/dmz.png and /dev/null differ diff --git a/content/post/framework-server/dns.jpg b/content/post/framework-server/dns.jpg deleted file mode 100644 index 0b32528..0000000 Binary files a/content/post/framework-server/dns.jpg and /dev/null differ diff --git a/content/post/framework-server/dri.png b/content/post/framework-server/dri.png deleted file mode 100644 index a578c79..0000000 Binary files a/content/post/framework-server/dri.png and /dev/null differ diff --git a/content/post/framework-server/error.jpg b/content/post/framework-server/error.jpg deleted file mode 100644 index 429eef8..0000000 Binary files a/content/post/framework-server/error.jpg and /dev/null differ diff --git a/content/post/framework-server/eth.jpg b/content/post/framework-server/eth.jpg deleted file mode 100644 index f8ad12a..0000000 Binary files a/content/post/framework-server/eth.jpg and /dev/null differ diff --git a/content/post/framework-server/fail.png b/content/post/framework-server/fail.png deleted file mode 100644 index f0e06db..0000000 Binary files a/content/post/framework-server/fail.png and /dev/null differ diff --git a/content/post/framework-server/feelsbadman.png b/content/post/framework-server/feelsbadman.png deleted file mode 100644 index b1c2a26..0000000 Binary files a/content/post/framework-server/feelsbadman.png and /dev/null differ diff --git a/content/post/framework-server/fix1.png b/content/post/framework-server/fix1.png deleted file mode 100644 index b36489e..0000000 Binary files a/content/post/framework-server/fix1.png and /dev/null differ diff --git a/content/post/framework-server/fix2.png b/content/post/framework-server/fix2.png deleted file mode 100644 index 5b64900..0000000 Binary files a/content/post/framework-server/fix2.png and /dev/null differ diff --git a/content/post/framework-server/fix3.png b/content/post/framework-server/fix3.png deleted file mode 100644 index 9af2433..0000000 Binary files a/content/post/framework-server/fix3.png and /dev/null differ diff --git a/content/post/framework-server/fw1.png b/content/post/framework-server/fw1.png deleted file mode 100644 index 72a95ee..0000000 Binary files a/content/post/framework-server/fw1.png and /dev/null differ diff --git a/content/post/framework-server/fw2.png b/content/post/framework-server/fw2.png deleted file mode 100644 index cec00e1..0000000 Binary files a/content/post/framework-server/fw2.png and /dev/null differ diff --git a/content/post/framework-server/imp.png b/content/post/framework-server/imp.png deleted file mode 100644 index c11b806..0000000 Binary files a/content/post/framework-server/imp.png and /dev/null differ diff --git a/content/post/framework-server/index.md b/content/post/framework-server/index.md deleted file mode 100644 index 71e4941..0000000 --- a/content/post/framework-server/index.md +++ /dev/null @@ -1,487 +0,0 @@ -+++ -author = "Kumar Damani" -title = "Helping my Framework Laptop reach its destiny" -date = "2023-07-29" -draft = false -description = "Framework laptop as a standalone server." -tags = [ - "technology" -] -math = false -+++ - -How I re-purposed my Framework as a standalone server for my home-lab. - - -> This is not sponsored by Framework ... though I wish it were :) - -# Primary Motivation -I #feelsbad for abusing my lowly NAS - - -{{< figure src="feelsbadman.png" title="" width="150px" >}} - -Its not it's fault that its owner expected it to run Collabora Online -while running all his other services without instantly crashing... - -![meme of error page](error.jpg) - -Did I learn anything? -Basically a NAS should just do NAS things like worry about storage. -Compute should be handled by something else. - -> Lesson learned. - - -# Secondary Motivation -Battery life is an issue with this gen. - -For my personal laptop I'd want something that has "all day" -battery like the newer gen Intels or Ryzens. - -My plan is to snag one of those when prices become -more attractive and retrofit it into my now hollow laptop chassis. - -Isn't this the Framework [mission](https://frame.work/ca/en/about#what-we-re-fixing)? - -> "Even better, what we've done to enable repair also opens up upgradability and customization. -This lets you get exactly the product you need and extends usable lifetime too." - - -# Idea -Re-purpose my 99%-of-the-time idle personal Framework laptop which is already -overkill for the remaining 1%-of-the-time tasks, to be a hypervisor server. - -Setup my home-lab services there, and provide data storage for those services over NFS from my NAS. - -I'll setup a dedicated "workstation" VM for those 1%-of-the-time tasks. - - -![physical architecture image](physical.png) - -# Prior to starting! -To avoid making the same mistakes I made, do the following **while -the mainboard is still in the laptop chassis!** - -![mistakes meme](mistakes.jpg) - -1. **Update your BIOS firmware to at least 3.17.** -It is **impossible** to do so once the battery is un-plugged from the board on older firmwares. -I learned this the hard-way. -This update will provide the critical options below for this process to be feasible. -1. In your BIOS settings, enable options for optimizing CPU performance over -battery life. -1. In your BIOS settings, enable "Standalone operation". -1. In your BIOS settings, under "Boot" enable the option to power-on on power-attach. -![bios image](bios.jpg) -1. Install Proxmox VE. Since this will require a screen, and keyboard input, you might as -well do it now. See the [hypervisor]({{< relref "#hypervisor" >}}) section below. - - ---- - -# Build -## Server -I'm using my original [Framework 13](https://frame.work/ca/en/products/mainboard-11th-gen-intel-core?v=FRANFG000B) laptop. - -![case image](case.jpg) - -Its an i7-1165G7 - yes a "mobile" CPU. -Am I asking for trouble? We'll see. -Its more than powerful enough for me (for now). - -Alternatively you could build/use another server. - -If you are also using the Framework 13, then you'll want to make sure -that you are running at least **BIOS 3.17**. -See the [issues]({{< relref "#issues" >}}) section below about my troubles. - - -## Case -As you can see above, I opted for the -[Coolermaster Case](https://frame.work/ca/en/products/cooler-master-mainboard-case) -because honestly it looks cool. - -Alternatively, you could self-print the [community](https://github.com/FrameworkComputer/Framework-Laptop-13) 3D case -or get someone else to print it. - - -## Network Connectivity -I opted for the 2.5G [ethernet expansion card](https://frame.work/ca/en/products/ethernet-expansion-card) -from Framework. - -![framework eth adapter image](eth.jpg) - -I suppose one could also use a WiFi card, -but it makes more sense to go wired in a 24/7 "on" configuration. - -Alternatively, most thunderbolt-ethernet dongles should do the job. -You'd want to check that there are Linux drivers for it. - -Since I host a few publicly accessible services (this blog for example), -I also need a public static IP under which an internet user can access these services. - -So I opt for a cheap VPS from [Racknerd](https://www.racknerd.com/kvm-vps). -These are about a $1/mo for a public IPv4 IP, and a decent amount of network bandwidth. - -![racknerd vps pricing image](vps.png) - -## Storage -### for VMs -I used the 1TB NVME drive I had on my Framework. - -### for Data -*You should have a storage solution (NAS) in place already!* - -![nas image](nas.jpg) - -Setting this up is beyond the scope of this post. -You can check out my DIY ZFS backed NAS setup [here](https://gitlab.com/kdam0/vps#nas-equipment). -I've had no (storage related) issues with my NAS since its inception over a year ago. - -Then when I need to allocate space for a new service I do: -```shell -zfs create / -zfs set compression=on/off -zfs set sharenfs="..." sharesmb=".." -``` - -Then when the time comes, configure the NFS mount on the client VM that requires access to this -data store: -```bash -mount -t nfs hostname-of-your-nas:/mnt/pool/dataset /mnt/data -``` - -There are also many options for pre-made NAS appliances such as Synology. - - -## Power -Highly recommend a UPS such as [this](https://www.amazon.ca/APC-BE600M1-Back-Uninterrupted-Electronics-Computers/dp/B01FWAZEIU/ref=sr_1_6?crid=28ZH7JP9IYXPU&keywords=ups&qid=1690928556&sprefix=ups%2Caps%2C172&sr=8-6). - -![ups image](ups.jpg) - -Even if you don't care about uptime, **you should care about data integrity** issues -resulting from abrupt power-loss. - -A UPS should buy you enough time to power things down gracefully. - - -# Hypervisor -I opted for [Proxmox VE](https://www.proxmox.com/en/proxmox-virtual-environment/overview) -since v8 was just released, I've been itching to try it out. Now felt like the right time. - -There is also a Terraform [provider](https://registry.terraform.io/providers/Telmate/proxmox/latest/docs) -allowing provisioning of VMs, and LXC Containers through code. Neat! - -> I recommend you do this **before** taking the mainboard out of the laptop chassis as you -will need to provide keyboard input, as well as see whats going on the screen. - -* Install it. -I just followed the [official instructions](https://www.proxmox.com/en/proxmox-virtual-environment/get-started). - -* Under your host (mine's `pve`), under System, Network, create a bridge `vmbr0` with: - -![proxmox net image](net1.png) - -This will make your Proxmox host available in your home network. -**Set this to something else if you like.** -> You should also reserve the corresponding IP in your home router for this host. - -While you're here, create another bridge `vmbr1` with `VLAN Aware` checked: - -![proxmox net image](net2.png) - -> We are going to create our home-lab network primarily on `vmbr1`. -> Think of `vmbr0` as a *management* bridge. - -# Network -I always find it best to sort out networking **before** we start building stuff. - -Since I'm basically starting over, I want to do it properly. -A few design goals: - -1. I want segregation of my home-lab services from my non-home-lab hosts -(my "workstation" VM for example), as well as the rest of my home network. -1. I don't want to keep track of static IP leases, everything should be DHCP, and DNS. -1. I want all traffic to/from my home-lab segment to be encrypted. Non-home-lab -traffic does not need to be encrypted. -1. I need some way to make these services publicly accessible over the internet. - -The first two goals necessitate a virtual firewall/router deployment capable of -*selectively* routing a segment of my network over a VPN. - -Here is what I would like: - -![network architecture](network.png) - -## Goals: 1,2 -At first I went with the popular [pfSense]() VM. -For a [few]({{< relref "#pfsense" >}}) reasons, I abandoned it quickly. - ---- - -Then I decided to try out [OpenWRT](), and boy am I glad I did. - ---- - -I gave it two networking interfaces, each `vbmrX` we created earlier: -![openwrt bridge image](pfnet.png) - -* `vmbr0` will be used to access our router from the home-network. -It will also be how our router gets access to the internet. Aka. **WAN**. -* `vmbr1` will be used to create various subnets for our home-lab. Aka. **LAN**. - -> You should reserve another IP in your home router using the MAC address generated for `net0`. -This will be how to access your home-lab router from your home network. - -I was able to setup a network with a few VLANs: -![openwrt network image](wrtnet.png) - -> This means that the next time we create a new VM or LXC container, we -can place it on `vmbr1`, with a particular VLAN Tag/`id` and it will start with -the corresponding IP for that network. - - -Few observations: -* The Luci web UI is much more minimal and to the point. -The terminology used for things are more in-line with what I'm familiar with. -* Soon I had the segregation I was looking for thanks to Firewall settings: -![firewall settings image](fw1.png) -* DHCP, **and** DNS working as expected. - -## Goals: 3 -Then I started working on setting up my VPN (Wireguard) remote on my VPS. - -* I followed the script from [here](https://github.com/angristan/wireguard-install). -Worked flawlessly. -* Added a peer through the script - my OpenWRT VM. -* Setup a domain - eg. `vpn.mydomain.com` to point to my VPS's public IP. -* Then I enabled the "DMZ" -setting (but **not** "Advanced DMZ" - which is probably the *real* DMZ) -on my home ISP router settings, and added my OpenWRT VM to it. -![dmz image](dmz.png) -* I also setup a port-forward for the Wireguard port 51820 from my ISP router settings, -to point to my OpenWRT VM's internal port 51820. -![port forward image](port1.png) - -After all that, I started setting up Wireguard on OpenWRT. -* The corresponding OpenWRT package is called `luci-app-wireguard`. -* This will give you the ability to create a Wireguard interface on OpenWRT. -![wg menu image](wg.png) - -* I followed the following excellent tutorial for setting up the Wireguard interface, -configured to use my VPS as its peer: -{{< youtube id="04q41GEPvKA" title="Setting up Wireguard on OpenWRT" >}} -* Created the new interface and added the firewall settings: -![openwrt wg ifrace](wrtnet2.png) -![firewall wg settings image](fw2.png) - -* As is, this will mean that **only** LAB will have internet access (using the Wireguard interface) - -which is not what I want. I still want other subnets to be routed via **WAN**. - -***If only there was a way to route by VLANs...*** - -> This is known as VPN *split-tunnelling*, or *Policy based routing*. - -Luckily OpenWRT has a way to accomplish exactly this with a package called `luci-app-pbr`. -This will add the PBR setting to your menu: -![pbr setting image](pbr.png) - - -* I followed the following tutorial: -{{< youtube id="FN2qfxNIs2g" title="Setting up PBR on OpenWRT" >}} - -* Set up the rule for my PBR: -![pbr rule image](pbr2.png) - -* The default interface is set to `wan`, so everything else should behave as normal: -![pbr global gateways image](pbr1.png) - -However, it did take many trail & error sessions -(see the [dns leakage issues]({{< relref "#pbr-dns-leakage" >}}) section below) -to get this working exactly as I wanted. - -**In summary**, - -When I create a VM/container in my *Lab* subnet, -* its external IP is that of my VPS -* when it reaches out to the internet, it goes through the Wireguard tunnel encrypted, -to the VPS, and out the VPS's ISP. -![lab flow image](lab.png) - -When I create a VM/container **not** in my Lab subnet, -* its external IP is the same as my home-network's public IP -* when it reaches out to the internet, it goes through my home ISP -(NAT), just like all other devices on my home-network. -![lan flow image](lan.png) - -PBR provides quite granular control over this, for example, if you run a Plex server, it frequently -needs to access the `plex.tv` domain. -You can choose to route any source going to `plex.tv` to route via the `wan` interface instead. - - - -## Goals: 4 -For publicly accessible services, I need to point their domains to my VPS. -I use sub-domains, so this is just a matter of creating `CNAME` records for these services. - -Then we setup our Wireguard on the VPS to forward all 80,443 TCP traffic to our -Wireguard on OpenWRT. -We'd need to add these lines **in addition** to your existing VPS `wg0` interface config: -``` -PostUp = iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 80 -j DNAT --to-destination :80 -PostUp = iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 443 -j DNAT --to-destination :443 -... -PostDown = iptables -t nat -D PREROUTING -p tcp -i eth0 --dport 80 -j DNAT --to-destination :80 -PostDown = iptables -t nat -D PREROUTING -p tcp -i eth0 --dport 443 -j DNAT --to-destination :443 -``` - -Then we also need to setup port-forwards for 80,443 on OpenWRT going to our Reverse Proxy VM/Container. -![port forwards image](port2.png) - -I just setup a temporary Caddy container in reverse-proxy mode to test this out. -![reverse-proxy setup image](rproxy.png) - -Once this works, we can move on to building out our services :) - -# Home Lab Services -These are *some* of the services I run ad LXC container: -* [Nextcloud](https://nextcloud.com/athome/) - files, and image storage and sharing (thanks to the excellent [Memories](https://apps.nextcloud.com/apps/memories) app). I used the official [AIO](https://github.com/nextcloud/all-in-one) install. -* [Plex](https://www.plex.tv/) - media streaming. -* [Vaultwarden](https://github.com/dani-garcia/vaultwarden) - a self-hosted password manager based on Bitwarden. -* A few static websites. - -How I set up these services is beyond the scope of this post. -You should check out my git repo's [readme](https://gitlab.com/kdam0/home-lab) for instructions. -I will just briefly summarize my process here. - -* I use LXC wherever possible as it has lower overhead than VMs. -* LXC or VM hosts are provisioned by Terraform and services are configured -by Ansible. - -One thing to note is that as of now, there is no automated way to pass-through my -iGPU to my LXC containers that would benefit from this - -such as Nextcloud (for Memories app), Plex etc. - -Instead you must edit the config on Proxmox for the corresponding container, and add -the following lines and restart the container. Edit `/etc/pve/lxc/.conf`: -``` -lxc.cgroup2.devices.allow: c 226:0 rwm -lxc.cgroup2.devices.allow: c 226:128 rwm -lxc.cgroup2.devices.allow: c 29:0 rwm -lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir -lxc.mount.entry: /dev/dri/renderD128 dev/renderD128 none bind,optional,create=file -``` -Then inside your LXC container do `ls -al /dev/dri/` and you should see some devices. - -![gpu devices image](dri.png) - -# Issues -## Intermittent connectivity loss with Framework -* When I initially started this project, I had already installed -Proxmox, and my setup my networking while on BIOS 3.16. -* However every couple of days (sometimes hours) I was observing loss of connectivity -to both my Proxmox host, and my virtual router. -* When I plugged in a monitor to see what was going on, I saw a few -messages on the TTY regarding `usbX disconnected...`. -* Unplugging and re-plugging in the ethernet card did not fix it. -* Usually a hard reset was required to bring things back to normal. - -I've encountered issues with other Framework peripherals in the past, -so I reached out to the Framework support folks, -and they immediately suggested a BIOS update. - -So I proceeded to give that a shot from within Proxmox using `fwupmgr`: -![bios up fail image](fail.png) - -And to my surprise it was complaining about *battery level*? -Its not even connected to the battery... - -I brought this up to the support and they confirmed my fear -that it was not possible to update the BIOS while having the battery detached. -Yikes! - -This was a deal-breaker for this whole project, until they confirmed -that once I was on 3.17, -it would be possible to do future updates without the battery being connected. - -* So I went ahead and pretty much attached the whole thing back into the laptop chassis -* Updated to 3.17, and applied "Standalone operation" -![bios update image](bios2.png) - -* Thankfully, all my connectivity issues have gone away now. -* Framework support service is excellent! - - -## Intermittent loss of internet for hosts in Lab Vlan. -This one kept me up for many nights. To summarize: -* in a host in the Lab network, doing an `apt update` the first time would hang, -mid-way through -* running it a few times again, would eventually succeed the operation -![wtf meme](wtf.jpg) - -Could it be DNS? -Could it be PBR? -Could it be Wireguard? - -After many hours of troubleshooting, I happened to have -seen errors during a `tcpdump` session on my VPN interface. - -Something about `...need to fragment...`. DOH! -* Lab internet access is via VPN (due to PBR). -* **VPN remote interface has an MTU of 1420, not 1500.** -* Proxmox `vmbr1` set MTU to 1500 by default. -* Therefore all hosts in Lab have a MTU mismatch trying -to get to the internet. - -> Fixed. It was not DNS... it was MTU. - -## PBR DNS leakage -The whole point having my Lab traffic go through Wireguard is -to prevent my home ISP from knowing what I am up to. -**DNS queries leaking to my ISP completely defeats this purpose!** - -Although my external IP would correctly report to being my VPS one, -tests like [this](https://github.com/macvk/dnsleaktest) -would show that DNS was still being sent to my home ISP. - -![dns meme image](dns.jpg) - -To fix this, I had to: -* **Un-check** setting default route on the Lab interface. -![dns fix 1 image](fix1.png) - -* Explicitly set DHCP DNS settings for my Lab gateway interface to -use my VPS's `wg0` interface IP. -![dns fix 2 image](fix2.png) - -* Needed a static route defied for the `wg0` interface targeting the VPN network -via the OpenWRT local IP for `wg0` as a gateway. -![dns fix 2 image](fix3.png) - -## pfSense -Few observations: -* Segregation was working how I wanted it to. -* A few firewall rules were required to allow access to parts of my home-network - NAS. -* DHCP, worked out of the box. -* However, DNS did not. - -I'm still not sure what the issue was, but it was probably something small. - -More importantly, I was quite overwhelmed with all the options in the UI for which I had no -knowledge of. - -Also, everything in pfSense pretty much *requires* a UI, which for now is fine, but -I'd like the option to move to a more automation friendly configuration in the future. - - -# Summary -The Framework laptop is happily fulfilling its destiny as a compute server, -and so is my NAS as a storage server. - -Since switching to this setup, I've observed a dramatic improvement -in responsiveness for all of my services. - -![improvement meme image](imp.png) - -Overall I'm quite pleased with how everything turned out once the -appropriate BIOS was running on the Framework. diff --git a/content/post/framework-server/lab.png b/content/post/framework-server/lab.png deleted file mode 100644 index 6591a8b..0000000 Binary files a/content/post/framework-server/lab.png and /dev/null differ diff --git a/content/post/framework-server/lan.png b/content/post/framework-server/lan.png deleted file mode 100644 index 461d598..0000000 Binary files a/content/post/framework-server/lan.png and /dev/null differ diff --git a/content/post/framework-server/mistakes.jpg b/content/post/framework-server/mistakes.jpg deleted file mode 100644 index d4b2e12..0000000 Binary files a/content/post/framework-server/mistakes.jpg and /dev/null differ diff --git a/content/post/framework-server/nas.jpg b/content/post/framework-server/nas.jpg deleted file mode 100644 index 75f5251..0000000 Binary files a/content/post/framework-server/nas.jpg and /dev/null differ diff --git a/content/post/framework-server/net1.png b/content/post/framework-server/net1.png deleted file mode 100644 index a0a4eff..0000000 Binary files a/content/post/framework-server/net1.png and /dev/null differ diff --git a/content/post/framework-server/net2.png b/content/post/framework-server/net2.png deleted file mode 100644 index c5ad118..0000000 Binary files a/content/post/framework-server/net2.png and /dev/null differ diff --git a/content/post/framework-server/network.png b/content/post/framework-server/network.png deleted file mode 100644 index 1b1fba6..0000000 Binary files a/content/post/framework-server/network.png and /dev/null differ diff --git a/content/post/framework-server/pbr.png b/content/post/framework-server/pbr.png deleted file mode 100644 index 2b1e330..0000000 Binary files a/content/post/framework-server/pbr.png and /dev/null differ diff --git a/content/post/framework-server/pbr1.png b/content/post/framework-server/pbr1.png deleted file mode 100644 index 4d7f075..0000000 Binary files a/content/post/framework-server/pbr1.png and /dev/null differ diff --git a/content/post/framework-server/pbr2.png b/content/post/framework-server/pbr2.png deleted file mode 100644 index 0a07839..0000000 Binary files a/content/post/framework-server/pbr2.png and /dev/null differ diff --git a/content/post/framework-server/pfnet.png b/content/post/framework-server/pfnet.png deleted file mode 100644 index 67cc5f4..0000000 Binary files a/content/post/framework-server/pfnet.png and /dev/null differ diff --git a/content/post/framework-server/physical.png b/content/post/framework-server/physical.png deleted file mode 100644 index fc1cb81..0000000 Binary files a/content/post/framework-server/physical.png and /dev/null differ diff --git a/content/post/framework-server/port1.png b/content/post/framework-server/port1.png deleted file mode 100644 index 1b72ab1..0000000 Binary files a/content/post/framework-server/port1.png and /dev/null differ diff --git a/content/post/framework-server/port2.png b/content/post/framework-server/port2.png deleted file mode 100644 index 37ff887..0000000 Binary files a/content/post/framework-server/port2.png and /dev/null differ diff --git a/content/post/framework-server/rproxy.png b/content/post/framework-server/rproxy.png deleted file mode 100644 index 0d3f0bf..0000000 Binary files a/content/post/framework-server/rproxy.png and /dev/null differ diff --git a/content/post/framework-server/ups.jpg b/content/post/framework-server/ups.jpg deleted file mode 100644 index 4cd7aee..0000000 Binary files a/content/post/framework-server/ups.jpg and /dev/null differ diff --git a/content/post/framework-server/vps.png b/content/post/framework-server/vps.png deleted file mode 100644 index 7392495..0000000 Binary files a/content/post/framework-server/vps.png and /dev/null differ diff --git a/content/post/framework-server/wg.png b/content/post/framework-server/wg.png deleted file mode 100644 index 18896a0..0000000 Binary files a/content/post/framework-server/wg.png and /dev/null differ diff --git a/content/post/framework-server/wrtnet.png b/content/post/framework-server/wrtnet.png deleted file mode 100644 index 73d435d..0000000 Binary files a/content/post/framework-server/wrtnet.png and /dev/null differ diff --git a/content/post/framework-server/wrtnet2.png b/content/post/framework-server/wrtnet2.png deleted file mode 100644 index 34cd6b9..0000000 Binary files a/content/post/framework-server/wrtnet2.png and /dev/null differ diff --git a/content/post/framework-server/wtf.jpg b/content/post/framework-server/wtf.jpg deleted file mode 100644 index 995fefe..0000000 Binary files a/content/post/framework-server/wtf.jpg and /dev/null differ diff --git a/content/post/listing-my-fav-advice/balance.jpg b/content/post/listing-my-fav-advice/balance.jpg deleted file mode 100644 index ee5050c..0000000 Binary files a/content/post/listing-my-fav-advice/balance.jpg and /dev/null differ diff --git a/content/post/listing-my-fav-advice/boss.jpg b/content/post/listing-my-fav-advice/boss.jpg deleted file mode 100644 index 631a78a..0000000 Binary files a/content/post/listing-my-fav-advice/boss.jpg and /dev/null differ diff --git a/content/post/listing-my-fav-advice/chewing.gif b/content/post/listing-my-fav-advice/chewing.gif deleted file mode 100644 index 12b7d16..0000000 Binary files a/content/post/listing-my-fav-advice/chewing.gif and /dev/null differ diff --git a/content/post/listing-my-fav-advice/index.md b/content/post/listing-my-fav-advice/index.md deleted file mode 100644 index 24611f7..0000000 --- a/content/post/listing-my-fav-advice/index.md +++ /dev/null @@ -1,102 +0,0 @@ -+++ -author = "Kumar Damani" -title = "A list of my favourite life advice" -date = "2023-09-01" -draft = false -description = "A list of my favourite life advice." -tags = [ - "lists", - "personal", -] -math = false -+++ - -I outline my favourite life advice, where I have heard it, and what it means to me. - - -## Everything in moderation, including moderation. [^1] -
- -| | | -| -------- | -------- | -| ![balancing rocks](balance.jpg) | ![indulgence painting](indulgence.jpg)| - - -The first part is fairly self-explanatory. -The second part says to moderate the moderation. -In other words, on occasion, it is ok to indulge. -After all, some of the best moments in life come from indulgence. -Don't be the person who is always moderating, or you will miss out on 100% of those moments. - - -This reminds me of a paradigm in Computation called [Reinforcement Learning](https://en.wikipedia.org/wiki/Reinforcement_learning) -(RL), where learning is maximized -by balancing existing knowledge, with occasional spurts of exploration. -Without exploration, we find that we are generally unlikely to end up at an -optimal solution, thus showing us its importance. - -If the objective of life is to attain long-term (cumulative) happiness, -then we can say that moderation is the current knowledge, and occasional indulgence -are the spurts of exploration, and both must be balanced in order to maximize our objective. - - -## Chew your food. Well. [^2] -
- -![chewing](chewing.gif) - -This one is quite underrated. -We all know that our digestion health is such a large contributor to our overall well-being. -Yet we religiously neglect the first step of the process - chewing. - -I specifically recall my grandpa saying "*chew it until it becomes a paste*". -Gross but effective. -No matter what your diet is composed of, its not debatable that chewing better will only -ever help your digestion, never harm. - -Another benefit? Sitting down and consciously chewing requires time and effort. -If you aren't doing it, maybe its a sign that you are rushing. -Why are you rushing? Maybe its time to re-evaluate some things in your life. - -## Don't worry so much about budgeting, focus on earning more. [^3] -
- -![money bob ross](money.jpg) - -This one is somewhat controversial. -I think this stems from the notion that there is a hard limit to how much you can restrict your spending to - $0. -But no limit to how much you can earn. So why not focus on that? - -I think this is largely a time-management principle. -Maybe you've heard the idiom "penny wise, and pound foolish". -If money is the *penny*, then your time is the *pound*. -Don't be foolish with your time. - -People often will go out of their way believing they are saving a certain amount of money -but hardly ever factor in the value of the time spent saving that amount. -And more often than not, that time is spent doing something that is not enjoyable. - -That same time could've been spent on trying to earn more money than what was saved or -at the very least doing something actually enjoyable. - - -## Never work for someone who you don't want to become. [^4] -
- -{{< figure src="boss.jpg" title="" width="50%" >}} - -This one has helped me substantially in my career. -More important than finding the right role/career is finding the right mentor. -I've personally switched roles based on this advice, and I can attribute most -my success as a direct result of this. - -We tend to emulate people that we are influenced by. -By working for such a manager, you are setting yourself up to emulate someone you look up to - -which is a great thing! -I also consider this one of the few advantages of being an employee rather than an owner. -Don't waste it! - -[^1]: Kia - my Jitsu instructor at U of T -[^2]: Grandparents -[^3]: John Hill from the [Super Hoopers podcast](https://podcasts.apple.com/us/podcast/super-hoopers-an-nba-podcast/id1053263719) quoting some book -[^4]: Mark Cuban? or Mr. Wonderful? or someone from Shark Tank IIRC diff --git a/content/post/listing-my-fav-advice/indulgence.jpg b/content/post/listing-my-fav-advice/indulgence.jpg deleted file mode 100644 index 446e3fb..0000000 Binary files a/content/post/listing-my-fav-advice/indulgence.jpg and /dev/null differ diff --git a/content/post/listing-my-fav-advice/money.jpg b/content/post/listing-my-fav-advice/money.jpg deleted file mode 100644 index 451ff7c..0000000 Binary files a/content/post/listing-my-fav-advice/money.jpg and /dev/null differ diff --git a/content/post/nas-upgrade/cockpit-lxc.png b/content/post/nas-upgrade/cockpit-lxc.png deleted file mode 100644 index a2a9363..0000000 Binary files a/content/post/nas-upgrade/cockpit-lxc.png and /dev/null differ diff --git a/content/post/nas-upgrade/ethernet.png b/content/post/nas-upgrade/ethernet.png deleted file mode 100644 index f39110d..0000000 Binary files a/content/post/nas-upgrade/ethernet.png and /dev/null differ diff --git a/content/post/nas-upgrade/index.md b/content/post/nas-upgrade/index.md deleted file mode 100644 index ea7f0bb..0000000 --- a/content/post/nas-upgrade/index.md +++ /dev/null @@ -1,139 +0,0 @@ ---- -title: "NAS Upgrade" -date: 2024-06-01T15:56:10-04:00 -draft: false -description: "I upgrade my NAS hardware, and the platform it runs on." -author: "Kumar Damani" ---- - -Doing it right this time. - - - -Until now I've been using a [RockPro64](https://pine64.org/devices/rockpro64/) in the (excellent for starters) Pine64 [NAS case](https://wiki.pine64.org/wiki/NASCase) for my NAS. -It runs [Armbian](https://www.armbian.com/rockpro64/), `openzfs`, and I manage my ZFS as needed on the CLI. -I share my datasets over NFS to my Proxmox guest VMs for access. -This has served me reasonably well for the past few years. -But we have a baby coming soon, and along with that a flurry of new photos and videos -for my family to store on my NAS. -And although I *probably* have enough buffer to survive the initial few months, -I certainly wish to do better than my current 2xHDD mirrored pool giving me ~4TB of storage. - -![nas nas](oldnas.png) - -# The Plan -Luckily I already possess the hard-drives I need for my desired pool. -In total, I have 2 HDDs from my current NAS, and 2 spares - -all the same 4TB capacity. - -I still want to keep my current NAS running as a backup store, -but I only need 1 drive for this purpose (for now). -That leaves me with 3 HDDs we can use for our new `raidz1` pool which would give -me 2 drives for storage and 1 for parity. - -Now for the platform. I have been a very happy user of [Proxmox](https://www.proxmox.com/en/proxmox-virtual-environment/overview) (on my compute node) -and it already comes ready with ZFS support so I'll stick with that. -I did consider [TrueNAS](https://www.truenas.com) (both standalone, and virtualized within Proxmox with -disk-passthrough), but when it comes to storage, I want as few surprises as possible -so I stuck with what I know. I'm already used to ZFS on the CLI and Proxmox is based on -Debian so if/when something goes wrong, I don't want to be messing around with an unfamiliar UI. - -Although I don't want to manage ZFS via a GUI, -I'd like a way to manage *access* to my datasets via a GUI. -[Cockpit](https://cockpit-project.org) seems like a good light-weight choice. -It runs as an LXC container within Proxmox using bind-mounts for the dataset paths. -I can then select which paths I allow access to over my network -using NFS, and SMB protocols on a per-user basis. - -# Shopping -Needs: -- `>= 3` hot-swappable HDD bays -- `>= 16` GB RAM (for ZFS) -- runs Proxmox - -Wants: -- IPMI -- 1U -- 10Gb networking - -On eBay, I ended up checking out with: - -![nas chassis](nas-chassis.png) -![ethernet adapter](ethernet.png) - -| Part | Price (shipped) | -| -------------- | --------------- | -| 1U 20" Short Depth Supermicro Server X9SCL-F XEON E3-1270 V2 16GB NIC Rails | $236 | -| Mellanox ConnectX-2 PCIe x8 10Gbe SFP+ network card | $23 | - -which gave me everything I needed **and** wanted! - -# Build -First I free one of my HDDs from my RockPro64 NAS for use in my new pool. -This means I am running on a single HDD for the remainder of the migration. - -With the free HDD, and my two spares, -I get everything assembled, and set up a new Proxmox node with a ZFS pool -from the UI using the 3 disks. - -![proxmox zfs pool](zfs-pool.png) - -# Sync -To migrate all of my data from the old pool to the new pool I use -[`syncoid`](https://github.com/jimsalterjrs/sanoid/tree/master?tab=readme-ov-file#syncoid). -It uses ZFS snapshots to accomplish this. It's awesome. - -This takes many hours depending on the size of your pool and your connection, -but since I saw almost full utilization of my network link -I was convinced it's the best I can do right now. - -I've seen in a few Reddit posts suggesting ways this can be optimized using -some combination of `zfs send` with `mbuffer` rather than `ssh` which -`syncoid` uses, but I'm happy with the convenience of `syncoid`. - -The best part is that everything can still be running while this is going on! -This is because only the first sync takes a long time since it needs to copy -*everything* over. All subsequent syncs only transfer the delta -since the last sync which should be pretty quick if your data does not change -all that much. - -That being said, since I am now running on a single drive, and hitting it hard during -sync, I do not want to stay in this state for any longer than I need to due to -potentially leading my single disk to failure. - -Once the sync is complete, I do a second sync (for the delta), and promptly -shut down all of my services to prepare for the cut-over. - -# Cockpit -Before I can re-enable my services. I need to expose my datasets on Cockpit. - -I create a Debian LXC, and assign the generated MAC a static IP on my network. -Other than that, I just make sure my container has the NFS feature enabled: - -![cockpit lxc features](cockpit-lxc.png) - -Setting up user permissions is a pain, but once done -I expose the relevant NFS as well as Samba paths for my services - -replicating my old NAS's shared paths. - -# Voila -In my homelab nameserver, I update the A record -for my NAS to point to the new IP of my Cockpit LXC container, -and start my services back up. - -I confirm everything is still good by turning off the old NAS, and yep still good. - -Luckily for me all good on the first try! - -# Finishing touches -I set up a cron on my old NAS to sync data nightly from the new pool. -This will only work while the actual data size on my new pool is less than 4TB, -so I'll need to get a new drive with higher capacity to keep the backups going -in the future. - -Luckily I should have about a year until I exceed 4TB on the new pool so I'll be keeping -an eye on deals to snag an 8TB backup drive along with a few spares for my new NAS. - -# Resources -- https://www.apalrd.net/posts/2023/ultimate_nas/ -- https://blog.kye.dev/proxmox-cockpit diff --git a/content/post/nas-upgrade/nas-chassis.png b/content/post/nas-upgrade/nas-chassis.png deleted file mode 100644 index 5d70b60..0000000 Binary files a/content/post/nas-upgrade/nas-chassis.png and /dev/null differ diff --git a/content/post/nas-upgrade/oldnas.png b/content/post/nas-upgrade/oldnas.png deleted file mode 100644 index 15ad609..0000000 Binary files a/content/post/nas-upgrade/oldnas.png and /dev/null differ diff --git a/content/post/nas-upgrade/zfs-pool.png b/content/post/nas-upgrade/zfs-pool.png deleted file mode 100644 index ecf9605..0000000 Binary files a/content/post/nas-upgrade/zfs-pool.png and /dev/null differ diff --git a/content/post/nixos-p1/boot.png b/content/post/nixos-p1/boot.png deleted file mode 100644 index 4e3d972..0000000 Binary files a/content/post/nixos-p1/boot.png and /dev/null differ diff --git a/content/post/nixos-p1/dwl.png b/content/post/nixos-p1/dwl.png deleted file mode 100644 index 8ecbe4d..0000000 Binary files a/content/post/nixos-p1/dwl.png and /dev/null differ diff --git a/content/post/nixos-p1/fox.jpg b/content/post/nixos-p1/fox.jpg deleted file mode 100644 index 3ace57f..0000000 Binary files a/content/post/nixos-p1/fox.jpg and /dev/null differ diff --git a/content/post/nixos-p1/index.md b/content/post/nixos-p1/index.md deleted file mode 100644 index 920ca94..0000000 --- a/content/post/nixos-p1/index.md +++ /dev/null @@ -1,385 +0,0 @@ -+++ -author = "Kumar Damani" -title = "Adventures in NixOS - Part 1" -date = "2023-03-24" -draft = false -description = "Guide to getting started with NixOS the modern way." -tags = [ - "technology" -] -+++ - -Almost a guide to getting started with NixOS the modern (2023) way. - - -There seems to be a shortage of written guides on the Internet for setting up NixOS -the "modern" way - Flakes + Home Manager. It doesn't help that Nix's official -docs are very disjointed so hopefully this will fill in some gaps that I observed -when setting it all up. - -![meme](fox.jpg) - -> Warning: NixOS is not exactly beginner friendly - -you should have familiarity installing Linux distros before trying this. - -## But Why NixOS? -Eh... FOMO regarding all the [memes](https://www.google.com/search?q=nixos+memes&tbm=isch). - -There is one particular feature that is intriguing - -the ability to roll-back your entire system (not incl. BIOS) in case of a -misconfiguration or a broken update. **You can't do this with Ansible.** -This allows you (in theory) to get the benefits of a rolling release as well as the -stability benefits of a traditional distro. - -> It takes the idea of reproducible builds, and extends it to the OS. - -For example, NixOS will present you with all previous "builds" at boot time -for you to revert to in case something gets messed up. -![boot prompt](boot.png) - -## Things I want to explore as part of this exercise: -1. How hard is it to go from a minimal install to productive? -At minimum I need a graphical environment with working vol, mic, camera, wifi, -and hibernation. -Is it harder than doing the same in something like Manjaro? -2. Is Wayland truly ready? -3. Try out [`dwl`](https://github.com/djpohly/dwl) (the Wayland port of `dwm` by the [suckless](https://suckless.org) folks) - -## Constraints -1. I want to stick to the "Nix" way of doing things as much as possible -*where it makes sense to me*. -2. Stick to Wayland only applications as much as possible. - -## Spoilers! (End result) -![my rice](rice.png) -(Probably too ugly for r/unixporn, but works for me :) - -## Installation -### Getting a Live USB going -* I used the [minimal iso](https://nixos.org/download.html#nixos-iso). -* Create a bootable USB with the usual - `sudo dd if=/path/to/iso of=/dev/sdX bs=4M`. -* Boot up. -* Then start following the steps for [manual installation](https://nixos.org/manual/nixos/stable/index.html#sec-installation-manual) -from the official guide to complete the install. - -> Make sure to give SWAP as much space as your memory capacity for hibernation to work properly. - -> Wifi did not work for me out of the box. So I used my phone to tether via USB. - -## First boot -If everything went well, you should be presented with a TTY prompting you to login: -``` -NixOS ... -Login: -Password: -``` -Once you login, you will still just have a TTY, but we can now go ahead and start -installing our graphical environment. - -## Housekeeping -* You should have two NixOS config files in `/etc/nixos/`: -``` -configuration.nix -hardware-configuration.nix -``` - -* Edit the `configuration.nix` file by setting the correct values for hostname, networking, timezone and users. I also add a few basic system-wide packages here such as `git, rsync, neovim, htop` etc. - -* To *apply and use* your changes to any of these files you need to run: -```bash -sudo nixos-rebuild switch -``` -* Since we want all our configuration to be version controlled, -I copied these files to live under my user's config: -`~/.config/{nix, nixpkgs}/`: -```bash -cp /etc/nix/nix.conf ~/.config/nix/nix.conf -cp /etc/nixos/configuration.nix ~/.config/nixpkgs/configuration.nix -``` - -Nix will now use these user-specific files to read its config :) - -### Flakes Support -Nix (the pkg mgr) does not come with Flakes support out-of-the-box. -So we need to enable it: -1. In `~/.config/nix/nix.conf` add: -``` -experimental-features = nix-command flakes -``` - -2. Apply it: -```bash -sudo nixos-rebuild switch -``` -Read about [Flakes](https://nixos.wiki/wiki/Flakes). - -### Home Manager Support -Now we can install the Home-Manager flake. -1. Init our base flake: -```bash -cd ~/.config/nixpkgs -nix flake init -``` -This should generate two files: -``` -flake.nix -flake.lock -``` -2. Next we tell `flake.nix` to manage all our configuration (system + home) for our system: -```nix -{ - description = "NixOS configuration"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - home-manager.url = "github:nix-community/home-manager"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; - nixos-hardware.url = "github:NixOS/nixos-hardware/master"; - }; - - outputs = inputs@{ nixpkgs, home-manager, nixos-hardware, ... }: { - nixosConfigurations = { - # Change below to use your hostname from configuration.nix - "art-sr" = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - ./configuration.nix - nixos-hardware.nixosModules.framework - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - # Change below to use your username from configuration.nix - home-manager.users.kdam0 = import ./home.nix; - - # Optionally, use home-manager.extraSpecialArgs to pass - # arguments to home.nix - } - ]; - }; - }; - }; -} -``` ->"art-sr" is my hostname for this machine. - -In my case, I also have the following two lines specifically to load settings for my hardware: -``` - nixos-hardware.url = "github:NixOS/nixos-hardware/master"; - ... - nixos-hardware.nixosModules.framework -``` -you will need to modify these values based on your [hardware support](https://github.com/NixOS/nixos-hardware). - -3. Create a `~/.config/nixpkgs/home.nix` file with your values: -```nix -{ config, pkgs, ...}: -{ - home.username = "kdam0"; - home.homeDirectory = "/home/kdam0"; - - programs.home-manager.enable = true; - home.stateVersion = "22.11"; - - services.gpg-agent = { - enable = true; - defaultCacheTtl = 1800; - enableSshSupport = true; - }; -} -``` - -4. Apply: -```bash -sudo nixos-rebuild switch -``` -> It took a few attempts to get NixOS to re-build successfully. -I ran into a few different issues involving users, and hostnames -while following the official docs until I arrived at the configs above which worked. - -Read about [Home Manager flake](https://nix-community.github.io/home-manager/index.html#ch-nix-flakes). - -**This would be a good time init a git repo in `~/.config/nixpkgs/` and publish your progress.** - -## Setting up the GUI -### Window Manager + bar + system info. -Getting `dwl` is easy enough. In my `home.nix`: -``` - home.packages = [ - pkgs.dwl - ... - ]; -``` -This will install `dwl` on a rebuild. -Then I can run it with `dwl`. - -Oh it fails...something about permissions... -In `~/.config/nixpkgs/configuration.nix` make sure you have: -``` - security.polkit.enable = true; -``` - -Oh it fails again with GLE errors :( Add: -``` - hardware.opengl = { - enable = true; - driSupport = true; - }; -``` - -**Sweet now it launches!** - -But of course I need to configure the keys - that's the whole point of a WM. -Additionally, `dwl` requires a re-build on every config change... - -**How do I tell Nix to use my config file while installing/building `dwl`?** - -Lucking all packages (`pkgs.*`) build files are defined on their GitHub. -We can see that we are allowed to pass in a `conf` argument to -[this](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/window-managers/dwl/default.nix) -file. - -After a bit of digging around, I arrived at how to do it: - -1. First copy your `config.h` to `~/.config/nixpkgs/dwl/config.h`. -2. Then point to it in your `home.nix`: -``` - home.packages = [ - (pkgs.dwl.override { - # trying to supply config.home.homeDirectory here leads to "impure" usage. - # so disabling it for now. - # conf = (builtins.readFile "${config.home.homeDirectory}/.config/dwl/config.h"); - conf = ./dwl/config.h; - }) - ... - ]; -``` - -> I know I can just clone the source myself and build it, but I like to use the default -package manager whenever possible to manage packages. - -Of course since `dwl` is as minimal as it gets, it does not ship with a bar. -We have many options for which bar to use, -I have very little use for a bar, so I kept it very simple and went with `somebar`: -``` - home.packages = [ - ... - pkgs.somebar - ... - ]; -``` - -If you want status info on your bar you can use something like `someblocks` - which will -let you script simple scripts with text output you want displayed in each block. -This will need to be cloned and built manually as it is not available in the Nix repos. - -Oh but you probably don't have `make` or any requirements to actually build it...fear not: -```bash -nix-shell -p gnumake -``` -which put you in a temporary environment with all the common build tools available. -Now you can: -```bash -sudo make install -``` - -`wbg` is a simple background setter for Wayland......aaaand BAM! - -![dwl pic](dwl.png) - -### Terminal -I use [`foot`](https://codeberg.org/dnkl/foot). - -Create the config file in `~/.config/nixpkgs/foot/foot.ini`: -``` -# for transparency # -[colors] -alpha=0.7 -``` - -Use it in `home.nix`: -``` - home.file.".config/foot/foot.ini".source = ../../common/foot/foot.ini; -``` - -> I use this pattern for pretty much all my *dotfiles*: -``` - # script that sets a bg. - home.file."bg.sh".source = common/bg.sh; - # script that starts my gui env. - home.file."start.sh".source = common/start.sh; - # foot config - home.file.".config/foot/foot.ini".source = common/foot/foot.ini; - # wofi config (app launcher) - home.file.".config/wofi/style.css".source = common/wofi/style.css; - # mako config (notifications) - home.file.".config/mako/config".source = common/mako/config; -``` - -### Sound -In my `configuration.nix`: -``` - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - wireplumber.enable = true; - media-session.enable = false; - jack.enable = true; - systemWide = false; - }; -``` - -### Nextcloud -I want a purely CLI way to handle this, and a periodic sync is sufficient for me. -We do this with `systemd-timers` (Nix advises against `cron`). -In my `home.nix`: -``` - systemd.user.services = { - nextcloud-sync = { - Unit = { - Description = "Auto sync Nextcloud"; - After = "network-online.target"; - }; - Service = { - Type = "simple"; - EnvironmentFile = "${config.home.homeDirectory}/.nextcloud.env"; - ExecStart = '' - ${pkgs.nextcloud-client}/bin/nextcloudcmd \ - -h --non-interactive \ - --user "''${NEXTCLOUD_USER}" \ - --password "''${NEXTCLOUD_PASSWORD}" \ - ''${NEXTCLOUD_DIR} \ - ''${NEXTCLOUD_URL} - ''; - TimeoutStopSec = "180"; - KillMode = "process"; - KillSignal = "SIGINT"; - }; - Install.WantedBy = ["multi-user.target"]; - }; - }; - systemd.user.timers = { - nextcloud-sync = { - Unit.Description = "Automatic sync files with Nextcloud when booted up after 5 minutes then rerun every 10 minutes"; - Timer.OnUnitActiveSec = "10min"; - Install.WantedBy = ["multi-user.target" "timers.target"]; - }; - }; - systemd.user.startServices = true; -``` - -## Conclusions -1. Yes setting things up from a minimal iso is harder than in Manjaro. -Although I got everything I wanted working, there were many times I felt -like giving up. (Aside: I am *so grateful* for Manjaro, and Arch wikis). -That said, I expect this friction is a one-time cost for building familiarity with Nix, -and well worth the benefits that come with it. -2. You bet Wayland is ready. Multi-monitor works out-of-the-box, -all my apps support it, and things just *feel* more polished than I have ever felt with Xorg. -3. `dwl` is as awesome as I had hoped! This is my daily driver now. - -## My configs -All the configs discussed (and more) are in my [nixdotfiles repo](https://gitlab.com/kdam0/dotfiles-nix). diff --git a/content/post/nixos-p1/rice.png b/content/post/nixos-p1/rice.png deleted file mode 100644 index 4fd97cf..0000000 Binary files a/content/post/nixos-p1/rice.png and /dev/null differ diff --git a/content/post/programming-as-art/code.png b/content/post/programming-as-art/code.png deleted file mode 100644 index 30c3522..0000000 Binary files a/content/post/programming-as-art/code.png and /dev/null differ diff --git a/content/post/programming-as-art/index.md b/content/post/programming-as-art/index.md deleted file mode 100644 index c724e68..0000000 --- a/content/post/programming-as-art/index.md +++ /dev/null @@ -1,94 +0,0 @@ -+++ -author = "Kumar Damani" -title = "Romanticism in Programming" -date = "2022-11-29" -draft = false -description = "How programming is romantic." -tags = [ - "personal" -] -math = true -+++ - -Why there is art in programming. - - -During my early days as a CS student, one of the first mind-blowing moments was -watching `Hello World!` getting printed out to the console thousands of times -in just two functional lines of code. - -```python -for _ in range(1, 1001): - print("Hello World!") -``` - -At the time it felt like having the [Elder Wand](https://harry-potter-compendium.fandom.com/wiki/Elder_Wand). -![Dumbledore with Elder Wand pic](wand.png) - -But there was more to our lesson. -The TA then asks us to put our newly found power to use by computing the -sum of 1 to 100. Of course, it was a natural application of what we had just done earlier: - -```python -sum = 0 -for i in range(1, 100+1): - sum = sum + i -``` - -Sure enough we saw the answer `5050` in the console. -But then the TA reminds us that we are making our computers **work too hard**. -In other words, the computer needs to do one-hundred ADD instructions in order to make this computation happen. - -What if the number was a million? How well would our method scale? - -Well then it would take a million ADD instructions. -We call this scaling *linearly* with the input size. -Later we would formalize this to $\mathcal{O}(n)$ (pronounced: *Big Oh of N*). - -The TA hinted that there is a better way, and that we already know of the better way in math. - -![Teaching meme](teaching.png) - -$\displaystyle S_n = \sum\limits_{i=1}^n i = 1 + 2 + ... + n = \frac{n (n + 1)}{2}$ - -With this we are no longer using loops, but a known mathematical fact about sequences. -If you don't belive me, see the [proof](https://letstalkscience.ca/educational-resources/backgrounders/gauss-summation). - -Written as code: -```python -sum = n (n + 1) / 2 -``` -This one-liner solves our problem with just 3 (ADD, MULTIPLY, DIVIDE) instructions. -Crucially, it does not depend on the size of the input like our previous solution, thus -**no matter the input, it always takes 3 instructions to compute!** -This is a HUGE win! - -![Math meme](math.png) - -Later we would formalize this to $\mathcal{O}(1)$, or *constant* scaling. - -> Yes, yes I know IRL the complier would optimize the loop solution -such that it does not take N instructions but for the purposes of -learning we were not allowed to depend on that. - -Looking back at it now, -both solutions are equally correct, and modern compilers would optimize the first solution -in the final instructions sent to the cpu, such that any performance differences would be negligible. -In other words, the computer wouldn't acutally be *working so hard*. - -Objectively, the first solution is more readable, and friendly to a new observer than the second. - -*Why then am I still so drawn to the second solution?* - -The first solution reminds me of the saying "to a hammer, eveything looks like a nail". -Its a brute force approach. -In comparison, the second solution is using the exact tool for our particular problem. -It somehow feels personalized and dare I say *romantic*. - -When I reflect on moments like this, it reminds me that there is emergent elegance and beauty -even in the seemingly arbitrary sequence of symbols that is `code`. -![The Matrix code going by image](code.png) - -Programming is not quite as *objective* as people would have you believe. -There are trade-offs to each solution, and which solution you prefer relect on the trade-offs -you are willing to accept, which varies by the observer: much like *art*. diff --git a/content/post/programming-as-art/math.png b/content/post/programming-as-art/math.png deleted file mode 100644 index bbdc372..0000000 Binary files a/content/post/programming-as-art/math.png and /dev/null differ diff --git a/content/post/programming-as-art/teaching.png b/content/post/programming-as-art/teaching.png deleted file mode 100644 index 9bf5dce..0000000 Binary files a/content/post/programming-as-art/teaching.png and /dev/null differ diff --git a/content/post/programming-as-art/wand.png b/content/post/programming-as-art/wand.png deleted file mode 100644 index 5eefc9c..0000000 Binary files a/content/post/programming-as-art/wand.png and /dev/null differ diff --git a/content/post/programs/dwl.png b/content/post/programs/dwl.png deleted file mode 100644 index 8ecbe4d..0000000 Binary files a/content/post/programs/dwl.png and /dev/null differ diff --git a/content/post/programs/index.md b/content/post/programs/index.md deleted file mode 100644 index 691b90f..0000000 --- a/content/post/programs/index.md +++ /dev/null @@ -1,92 +0,0 @@ -+++ -author = "Kumar Damani" -title = "Programs and Equipment" -date = "2021-11-12" -description = "Overview for the programs and equipment I use day-to-day." -tags = [ - "personal", - "tech", -] -+++ - -The programs and equipment I use on a daily basis. - - -# Programs and Equipment I Use -I'm about getting things done quickly and having as little latency between -my thoughts and actions on the computer. - -I like having vim-like bindings and prefer running programs in the terminal for simplicity's sake. -That said, I'm very much against the cringe meme that things in the terminal are "cooler" or "nerdier" XD. -Terminals are good for most tasks, but useless for others, for example, browsing the web -(I admit this unfortunate fact with much consternation) or looking at maps. - -## Software I Use - -### OS Distribution -[NixOS](https://nixos.org/). NixOS is an immutable OS where you are only allowed to modify the system -via declarative config files. - -I've distro-hopped between Manjaro, Void, Debian, and Fedora, but since NixOS -this has largely stopped as I'm quite happy with my NixOS + Home Manager setup. -I did like Debian, and Fedora as well. - -You can find my configs [here](https://gitlab.com/kdam0/dotfiles-nix). -There is a dedicated [post]({{< ref "/post/nixos-p1" >}}) about this. - - -### Desktop Environment -I've settled on [DWL](https://github.com/djpohly/dwl) after many years of hopping. -Its clean, functional, and extremely light. - -Prior to this, I've used Bsmpw + Sxhkd, i3, Gnome, KDE Plasma etc. -I'm glad these exist and people get use out of it, but for now I do not miss it. - -![DWL](dwl.png) - -### Text Editor -[(neo)vim](https://neovim.io/). Less of a text editor and more of a lifestyle. Check out my dotfiles for this. -No, I'm not going to ever switch to emacs. - -![Neovim](https://neovim.io/images/showcase/telescope_helptags.png) - -### Web Browser -[Firefox](https://www.mozilla.org/en-US/firefox/features/) / -[Brave](https://brave.com) / -[Vivaldi](https://vivaldi.com). -I have tried, Chromium, Qutebrowser in the past. - -### File Manager -[ranger](https://github.com/ranger/ranger). Yes, I've tried `nnn` and others. -Yes I know its not the fastest, but something about Ranger makes me keep coming back to it :shrug:. - -![ranger](https://raw.githubusercontent.com/ranger/ranger-assets/master/screenshots/twopane.png) - -## Where can I find good software options? -The program of your dreams is probably listed below: -* The [suckless](https://suckless.org/rocks/) website's list of programs that "rock". -Generally minimalist programs. -* A more comprehensive [list](https://github.com/mayfrost/guides/blob/master/ALTERNATIVES.md) -of minimalist software. -* [FSF's Free Software Directory](https://directory.fsf.org/wiki/Main_Page). - Emphasis on libre software (although most software in the links above will have free licenses as well). -* [Gentoo Wiki Recommendations](https://wiki.installgentoo.com/index.php/List_of_recommended_GNU/Linux_software) - A good mix of programs for novices and advanced users. - -## Hardware I Use - -### Laptop -~~The main laptop I use is the [Framework laptop](https://frame.work/). -I'm a huge fan of the whole upgradability concept coming from a few generations of ThinkPads.~~ - -I've since re-purposed this laptop to be [something else]({{< ref "/post/framework-server" >}}). - -## What I don't use -Proprietary software. - -I'm not going to endorse proprietary services that have gone out of their way to spy on or politically -suppress their users, just as Facebook, Discord etc. -One of the many take-aways you should get from me is that the use of libre/free software, -by its nature, is more constructive and extensible; and **that's the point**. - -There are philosophical reasons for this I talk about [here]({{< ref "/post/self-host" >}}). diff --git a/content/post/self-host/6imv05.jpg b/content/post/self-host/6imv05.jpg deleted file mode 100644 index d042d7a..0000000 Binary files a/content/post/self-host/6imv05.jpg and /dev/null differ diff --git a/content/post/self-host/elections.jpg b/content/post/self-host/elections.jpg deleted file mode 100644 index ac4ac96..0000000 Binary files a/content/post/self-host/elections.jpg and /dev/null differ diff --git a/content/post/self-host/freedom.jpg b/content/post/self-host/freedom.jpg deleted file mode 100644 index d62048a..0000000 Binary files a/content/post/self-host/freedom.jpg and /dev/null differ diff --git a/content/post/self-host/index.md b/content/post/self-host/index.md deleted file mode 100644 index 238186a..0000000 --- a/content/post/self-host/index.md +++ /dev/null @@ -1,125 +0,0 @@ -+++ -author = "Kumar Damani" -title = "Why do I self-host?" -date = "2022-09-12" -description = "Overview of why I self-host." -tags = [ - "personal", - "tech", -] -+++ - -My reasons for self-hosting. - - -## Digital freedom/independence - -![Freedeom pic](freedom.jpg) - -To put it simply, if you use a service such as Lastpass, iCloud, Dropbox, GDrive, OneDrive, etc. -to store your data, **you do not own it**. - -You are *trusting* corp. X to store it, secure it, and make it available to you. -Beyond the obvious privacy pitfalls with this, there are many other things that -could go wrong with your data being stored this way: - -* Corp. X could vanish/close/"declare bankruptcy" (as with many crypto corps. lately), and you lose your data. -* Corp. X could make a policy change and lock you out from accessing your account. -* Or you could "forget" to pay the bills a few times and get locked out. -* Corp. X could get hacked, and your data gets stolen. This is the latest trend! -* Many other doomsday 💀 scenarios. - -Personally, I don't feel comfortable depending on the existence of corp. X *for data that is important to - me* i.e. a lifetime's worth of documents, memories, and passwords etc. -I 💤 much better at night knowing I am avoiding most if not all of the risks above. - - -## Privacy -Normies often ask me some variation of: -* Why do I care if corp. X has my data? I have nothing to hide! -* Since I'm aware of targeted advertising, it won't work on me, - so why should I care if corp. X has my data? - -{{< figure src="why.jpg" alt="my pic" width="75%" >}} - -To such questions, I follow-up with: -> **Do you want to contribute to a dystopian ([Orwellian](https://en.wikipedia.org/wiki/Orwellian) future?** - -{{< figure src="police.jpg" alt="thought police" width="75%" >}} - -If your answer is *yes*, then no need to read further, the following will not change your mind. - -If your answer is *no*, but you aren't convinced that/how these are related, -then the *argument goes something like this...* -* We live in a world of mass data-collection/surveillance. -* This enables corp. X to use techniques such as ML (Machine Learning) to build/train models (or "AI" - - Artificial Intelligence)that aim to predict human behaviour. -* That by itself is not a problem here. -* The problems arise when corp. X use these techniques for profit without - regard for the harm they cause at a *population level*. - -I have unfortunately lived through enough of these cases to be able to cite a few recent examples: -* Instagram (etc.) designs its apps/products optimizing for maximum addiction[^1]. - Think slot-machines. - You might think you are "too smart" to fall for these tricks, and you might be right, - but what about the millions of adolescents using these platforms who aren't as wise as you? - The data collected, and techniques developed from *your usage* enables platforms - to target not only you, but *all* users on the platform, including the most vulnerable. - - Unfortunately, many of these kids will end up suffering from mental-health, - body-image, self-esteem issues[^2], - and for some it **will be fatal**. - I do not think this is morally acceptable, and is primary reason I refuse - to participate in social-media platforms. - - ![Depression](6imv05.jpg) - [^1]: [Smartphones and dopamine](https://sitn.hms.harvard.edu/flash/2018/dopamine-smartphones-battle-time/) - [^2]: [Mental health and social media](https://onlinedegrees.unr.edu/online-master-of-public-health/impact-of-social-media-on-youth-mental-health/) - -You could say "well that's due to bad parenting", but the point remains that -more and more of the digital world is having real world negative consequences regardless of -your individual participation level. Another example: - -* By now its well known that Facebook's (etc.) targeted advertising - played a significant a role in the 2016 US Elections[^3]. - Facebook was able to do this thanks to its users voluntarily giving personal information for two decades. - However, the policies that come out of this election has real world consequences to millions - (if not billions) of people, regardless of their *individual* Facebook usage, which - undermines the very purpose of a democratic republic. - Regardless of your political affiliation, it should worry you that this *can* happen. - - ![Elections](elections.jpg) - [^3]: [Excerpt from Facebook ex-exec](https://www.theverge.com/2017/12/11/16761016/former-facebook-exec-ripping-apart-society) - -To summarize, it might not be a problem if individuals disregard their -privacy at the individual level, but in aggregate, a population-wide disregard -has dystopian consequences. - -So the question you have to ask yourself is: -> **What can I do?** - -Start by **valuing your privacy**. -Then, follow some of these tips to *say no...* -* **Limit your exposure to these services.** If a friend stops talking to you because - of this, then congratulations, you've just gotten rid of a fake friend. You're welcome. -* [Self-host](https://wiki.r-selfhosted.com/getting-started/what-is-self-hosting/) - as much as you can. - You can see how I [implement](https://gitlab.com/kdam0/vps) this and replicate it yourself, - though it is a bit involved for normies. -* If neither of the above work for you, then you'll need to do some research to - find an alternative source that you can trust isn't doing the same thing. - Use [this](https://github.com/awesome-selfhosted/awesome-selfhosted) - as a starting point and try to search (Ctrl+f) for your service. For eg. Twitter, and - Instagram both have popular options available. -* **Stop using Chrome.** If you must use it, use [Brave](https://brave.com/) instead. - I advocate for [Firefox](https://www.mozilla.org/en-US/firefox/new/?redirect_source=firefox-com). - Neither are perfect, but both offer privacy respecting options in their settings. - Specifically disabling cross-site tracking is important. - Beyond that, install an ad-blocker extension such as [UBlock Origin](https://ublockorigin.com/) - on both of them. Don't forget to do the same on your mobile device! -* Things get more complicated on cell-phones. - I suggest switching to a privacy respecting operating-system such as [GrapheneOS](https://grapheneos.org/) - Short of this, you can only limit your usage. -* Support government policies that respect user-privacy. - -{{< figure src="office.png" alt="office pic" width="75%" >}} diff --git a/content/post/self-host/office.png b/content/post/self-host/office.png deleted file mode 100644 index 9cff3ce..0000000 Binary files a/content/post/self-host/office.png and /dev/null differ diff --git a/content/post/self-host/police.jpg b/content/post/self-host/police.jpg deleted file mode 100644 index dde2b44..0000000 Binary files a/content/post/self-host/police.jpg and /dev/null differ diff --git a/content/post/self-host/why.jpg b/content/post/self-host/why.jpg deleted file mode 100644 index eda5402..0000000 Binary files a/content/post/self-host/why.jpg and /dev/null differ diff --git a/deploy.sh b/deploy.sh deleted file mode 100755 index 6364e94..0000000 --- a/deploy.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -# more like build + deploy -hugo -source .env -AWS_CONFIG_FILE=credentials aws --endpoint-url ${AWS_ENDPOINT} s3 cp ${AWS_LOCAL_DIR} s3://${AWS_BUCKET_NAME}/${AWS_UPLOAD_DIR} --recursive diff --git a/flake.lock b/flake.lock deleted file mode 100644 index 3c8db2b..0000000 --- a/flake.lock +++ /dev/null @@ -1,471 +0,0 @@ -{ - "nodes": { - "cachix": { - "inputs": { - "devenv": "devenv_2", - "flake-compat": [ - "devenv", - "flake-compat" - ], - "nixpkgs": [ - "devenv", - "nixpkgs" - ], - "pre-commit-hooks": [ - "devenv", - "pre-commit-hooks" - ] - }, - "locked": { - "lastModified": 1712055811, - "narHash": "sha256-7FcfMm5A/f02yyzuavJe06zLa9hcMHsagE28ADcmQvk=", - "owner": "cachix", - "repo": "cachix", - "rev": "02e38da89851ec7fec3356a5c04bc8349cae0e30", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "cachix", - "type": "github" - } - }, - "devenv": { - "inputs": { - "cachix": "cachix", - "flake-compat": "flake-compat_2", - "nix": "nix_2", - "nixpkgs": "nixpkgs_2", - "pre-commit-hooks": "pre-commit-hooks" - }, - "locked": { - "lastModified": 1720450778, - "narHash": "sha256-H4CcD1ZeaHTluZNbFMN6d4L1peG5LzJTp2bJKShkjGc=", - "owner": "cachix", - "repo": "devenv", - "rev": "c5cab22d9750a9aa88aa0946849903fb619be954", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "devenv", - "type": "github" - } - }, - "devenv_2": { - "inputs": { - "flake-compat": [ - "devenv", - "cachix", - "flake-compat" - ], - "nix": "nix", - "nixpkgs": "nixpkgs", - "poetry2nix": "poetry2nix", - "pre-commit-hooks": [ - "devenv", - "cachix", - "pre-commit-hooks" - ] - }, - "locked": { - "lastModified": 1708704632, - "narHash": "sha256-w+dOIW60FKMaHI1q5714CSibk99JfYxm0CzTinYWr+Q=", - "owner": "cachix", - "repo": "devenv", - "rev": "2ee4450b0f4b95a1b90f2eb5ffea98b90e48c196", - "type": "github" - }, - "original": { - "owner": "cachix", - "ref": "python-rewrite", - "repo": "devenv", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1719994518, - "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", - "type": "github" - }, - "original": { - "id": "flake-parts", - "type": "indirect" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1689068808, - "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "devenv", - "pre-commit-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "nix": { - "inputs": { - "flake-compat": "flake-compat", - "nixpkgs": [ - "devenv", - "cachix", - "devenv", - "nixpkgs" - ], - "nixpkgs-regression": "nixpkgs-regression" - }, - "locked": { - "lastModified": 1712911606, - "narHash": "sha256-BGvBhepCufsjcUkXnEEXhEVjwdJAwPglCC2+bInc794=", - "owner": "domenkozar", - "repo": "nix", - "rev": "b24a9318ea3f3600c1e24b4a00691ee912d4de12", - "type": "github" - }, - "original": { - "owner": "domenkozar", - "ref": "devenv-2.21", - "repo": "nix", - "type": "github" - } - }, - "nix-github-actions": { - "inputs": { - "nixpkgs": [ - "devenv", - "cachix", - "devenv", - "poetry2nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1688870561, - "narHash": "sha256-4UYkifnPEw1nAzqqPOTL2MvWtm3sNGw1UTYTalkTcGY=", - "owner": "nix-community", - "repo": "nix-github-actions", - "rev": "165b1650b753316aa7f1787f3005a8d2da0f5301", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nix-github-actions", - "type": "github" - } - }, - "nix_2": { - "inputs": { - "flake-compat": [ - "devenv", - "flake-compat" - ], - "nixpkgs": [ - "devenv", - "nixpkgs" - ], - "nixpkgs-regression": "nixpkgs-regression_2" - }, - "locked": { - "lastModified": 1712911606, - "narHash": "sha256-BGvBhepCufsjcUkXnEEXhEVjwdJAwPglCC2+bInc794=", - "owner": "domenkozar", - "repo": "nix", - "rev": "b24a9318ea3f3600c1e24b4a00691ee912d4de12", - "type": "github" - }, - "original": { - "owner": "domenkozar", - "ref": "devenv-2.21", - "repo": "nix", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1692808169, - "narHash": "sha256-x9Opq06rIiwdwGeK2Ykj69dNc2IvUH1fY55Wm7atwrE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "9201b5ff357e781bf014d0330d18555695df7ba8", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1719876945, - "narHash": "sha256-Fm2rDDs86sHy0/1jxTOKB1118Q0O3Uc7EC0iXvXKpbI=", - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz" - } - }, - "nixpkgs-regression": { - "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - } - }, - "nixpkgs-regression_2": { - "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - } - }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1710695816, - "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "614b4613980a522ba49f0d194531beddbb7220d3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1713361204, - "narHash": "sha256-TA6EDunWTkc5FvDCqU3W2T3SFn0gRZqh6D/hJnM02MM=", - "owner": "cachix", - "repo": "devenv-nixpkgs", - "rev": "285676e87ad9f0ca23d8714a6ab61e7e027020c6", - "type": "github" - }, - "original": { - "owner": "cachix", - "ref": "rolling", - "repo": "devenv-nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1719957072, - "narHash": "sha256-gvFhEf5nszouwLAkT9nWsDzocUTqLWHuL++dvNjMp9I=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "7144d6241f02d171d25fba3edeaf15e0f2592105", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "poetry2nix": { - "inputs": { - "flake-utils": "flake-utils", - "nix-github-actions": "nix-github-actions", - "nixpkgs": [ - "devenv", - "cachix", - "devenv", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1692876271, - "narHash": "sha256-IXfZEkI0Mal5y1jr6IRWMqK8GW2/f28xJenZIPQqkY0=", - "owner": "nix-community", - "repo": "poetry2nix", - "rev": "d5006be9c2c2417dafb2e2e5034d83fabd207ee3", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "poetry2nix", - "type": "github" - } - }, - "pre-commit-hooks": { - "inputs": { - "flake-compat": [ - "devenv", - "flake-compat" - ], - "flake-utils": "flake-utils_2", - "gitignore": "gitignore", - "nixpkgs": [ - "devenv", - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" - }, - "locked": { - "lastModified": 1713775815, - "narHash": "sha256-Wu9cdYTnGQQwtT20QQMg7jzkANKQjwBD9iccfGKkfls=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "2ac4dcbf55ed43f3be0bae15e181f08a57af24a4", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, - "root": { - "inputs": { - "devenv": "devenv", - "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_3" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index 0a5a069..0000000 --- a/flake.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ - description = "My website project"; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; - devenv.url = "github:cachix/devenv"; - }; - - outputs = inputs@{ flake-parts, nixpkgs, ... }: - flake-parts.lib.mkFlake { inherit inputs; } { - imports = [ - inputs.devenv.flakeModule - ]; - systems = nixpkgs.lib.systems.flakeExposed; - perSystem = { config, self', inputs', pkgs, system, ... }: { - devenv.shells.website = { - packages = [ pkgs.hugo pkgs.awscli ]; - enterShell = '' - echo this is my hugo website project shell. - ''; - }; - }; - }; -} diff --git a/hugo.toml b/hugo.toml deleted file mode 100644 index 8ab4448..0000000 --- a/hugo.toml +++ /dev/null @@ -1,94 +0,0 @@ -baseURL = 'https://kumardamani.net/' -languageCode = 'en-us' -title = 'Kumar Damani - Home' -theme = 'risotto' -paginate = 3 -enableEmoji = true -DefaultContentLanguage = "en" - -enableInlineShortcodes = true -# prevent build failures when using Hugo's Instagram shortcode due to deprecated Instagram API. -# See https://github.com/gohugoio/hugo/issues/7228#issuecomment-714490456 -ignoreErrors = ["error-remote-getjson"] -sectionPagesMenu = "main" - -[params] -noindex = false - -[params.theme] -palette = "tokyo-night-dark" -#palette = "base16-dark" - -# Sidebar: about/bio -[params.about] -title = "Links" -description = "Git, email, and resume" -logo_image = "images/rice.svg" - -[[params.socialLinks]] -icon = "fa-brands fa-gitlab" -title = "GitLab" -url = "https://gitlab.com/kdam0/" - -[[params.socialLinks]] -icon = "fa-solid fa-envelope" -title = "Email" -url = "mailto:me@kumardamani.net" - -[[params.socialLinks]] -icon = "fa-solid fa-file" -title = "Resume" -url = "/KumarDamaniCV.pdf" - -[menu] - - [[menu.main]] - identifier = "photos" - name = "Photos" - url = "https://nc.kumardamani.net/apps/memories/a/vSk9IAWVUx2vcqphL9nMnLFmDQBDZWPr" - weight = 10 - -[taxonomies] -category = "categories" -tag = "tags" -series = "series" - -# For hugo >= 0.60.0, enable inline HTML -[markup.goldmark.renderer] -unsafe = true - -[markup] - - # Table of contents - # Add toc = true to content front matter to enable - [markup.tableOfContents] - startLevel = 1 - endLevel = 4 - ordered = true - -[privacy] - - [privacy.vimeo] - disabled = false - simple = true - - [privacy.twitter] - disabled = false - enableDNT = true - simple = true - - [privacy.instagram] - disabled = false - simple = true - - [privacy.youtube] - disabled = false - privacyEnhanced = true - -[services] - - [services.instagram] - disableInlineCSS = true - - [services.twitter] - disableInlineCSS = true diff --git a/layouts/partials/head.html b/layouts/partials/head.html deleted file mode 100644 index 4c2061e..0000000 --- a/layouts/partials/head.html +++ /dev/null @@ -1,18 +0,0 @@ -{{ with .Title }}{{ . }} – {{end}}{{ .Site.Title }} -{{ with .Site.Params.about }}{{ end }} - - - -{{ if .Site.Params.noindex }} {{ end }} -{{ if .Params.math }}{{ partial "helpers/katex.html" . }}{{ end }} - - - - - - - - - - - diff --git a/layouts/partials/helpers/katex.html b/layouts/partials/helpers/katex.html deleted file mode 100644 index 26baa4a..0000000 --- a/layouts/partials/helpers/katex.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - diff --git a/static/KumarDamaniCV.pdf b/static/KumarDamaniCV.pdf deleted file mode 100644 index 09c1c60..0000000 Binary files a/static/KumarDamaniCV.pdf and /dev/null differ diff --git a/static/btc.png b/static/btc.png deleted file mode 100644 index d076204..0000000 Binary files a/static/btc.png and /dev/null differ diff --git a/static/css/custom.css b/static/css/custom.css deleted file mode 100644 index 993305e..0000000 --- a/static/css/custom.css +++ /dev/null @@ -1,44 +0,0 @@ -@font-face { - font-family: "Zilla"; - src: url('../fonts/zilla/ZillaSlab-Regular.ttf') format('truetype'); - font-style: normal; - font-weight: normal; -} -@font-face { - font-family: "Zilla"; - src: url('../fonts/zilla/ZillaSlab-Italic.ttf') format('truetype'); - font-style: italic; - font-weight: normal; -} -@font-face { - font-family: "Zilla"; - src: url('../fonts/zilla/ZillaSlab-Bold.ttf') format('truetype'); - font-style: normal; - font-weight: bold; -} - -blockquote { - background: var(--inner-bg); - border-left: 4px solid var(--hover); - margin: 0 0 1.5rem 1.5rem; - padding: 0.5em 10px; - border-radius: 4px; -} - -blockquote > p { - font-style: normal; - color: var(--off-fg); - font-weight: normal; - font-family: "Zilla", serif; -} - -table { - border-collapse: collapse; - width: 100%; -} - -td { - border-top: 1px solid #ccc; - border-bottom: 1px solid #ccc; - padding: 0.6rem; -} diff --git a/static/fonts/zilla/ZillaSlab-Bold.ttf b/static/fonts/zilla/ZillaSlab-Bold.ttf deleted file mode 100644 index 41ef261..0000000 Binary files a/static/fonts/zilla/ZillaSlab-Bold.ttf and /dev/null differ diff --git a/static/fonts/zilla/ZillaSlab-BoldItalic.ttf b/static/fonts/zilla/ZillaSlab-BoldItalic.ttf deleted file mode 100644 index 2735488..0000000 Binary files a/static/fonts/zilla/ZillaSlab-BoldItalic.ttf and /dev/null differ diff --git a/static/fonts/zilla/ZillaSlab-Italic.ttf b/static/fonts/zilla/ZillaSlab-Italic.ttf deleted file mode 100644 index c0b99a8..0000000 Binary files a/static/fonts/zilla/ZillaSlab-Italic.ttf and /dev/null differ diff --git a/static/fonts/zilla/ZillaSlab-Light.ttf b/static/fonts/zilla/ZillaSlab-Light.ttf deleted file mode 100644 index 5709e4b..0000000 Binary files a/static/fonts/zilla/ZillaSlab-Light.ttf and /dev/null differ diff --git a/static/fonts/zilla/ZillaSlab-LightItalic.ttf b/static/fonts/zilla/ZillaSlab-LightItalic.ttf deleted file mode 100644 index 3c21c9b..0000000 Binary files a/static/fonts/zilla/ZillaSlab-LightItalic.ttf and /dev/null differ diff --git a/static/fonts/zilla/ZillaSlab-Medium.ttf b/static/fonts/zilla/ZillaSlab-Medium.ttf deleted file mode 100644 index 1d20d0c..0000000 Binary files a/static/fonts/zilla/ZillaSlab-Medium.ttf and /dev/null differ diff --git a/static/fonts/zilla/ZillaSlab-MediumItalic.ttf b/static/fonts/zilla/ZillaSlab-MediumItalic.ttf deleted file mode 100644 index c72c5eb..0000000 Binary files a/static/fonts/zilla/ZillaSlab-MediumItalic.ttf and /dev/null differ diff --git a/static/fonts/zilla/ZillaSlab-Regular.ttf b/static/fonts/zilla/ZillaSlab-Regular.ttf deleted file mode 100644 index c1188fa..0000000 Binary files a/static/fonts/zilla/ZillaSlab-Regular.ttf and /dev/null differ diff --git a/static/fonts/zilla/ZillaSlab-SemiBold.ttf b/static/fonts/zilla/ZillaSlab-SemiBold.ttf deleted file mode 100644 index 3486689..0000000 Binary files a/static/fonts/zilla/ZillaSlab-SemiBold.ttf and /dev/null differ diff --git a/static/fonts/zilla/ZillaSlab-SemiBoldItalic.ttf b/static/fonts/zilla/ZillaSlab-SemiBoldItalic.ttf deleted file mode 100644 index bee778e..0000000 Binary files a/static/fonts/zilla/ZillaSlab-SemiBoldItalic.ttf and /dev/null differ diff --git a/static/kd.jpeg b/static/kd.jpeg deleted file mode 100644 index 2613ece..0000000 Binary files a/static/kd.jpeg and /dev/null differ diff --git a/static/xmr.png b/static/xmr.png deleted file mode 100644 index 6f78ca0..0000000 Binary files a/static/xmr.png and /dev/null differ diff --git a/themes/risotto b/themes/risotto deleted file mode 160000 index 00d8fab..0000000 --- a/themes/risotto +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 00d8fab5951bf85a6904cb5f78bfefd4b94417d9 -- cgit v1.2.3