diff options
Diffstat (limited to 'public/post')
20 files changed, 0 insertions, 1224 deletions
diff --git a/public/post/index.html b/public/post/index.html deleted file mode 100644 index fbaa589..0000000 --- a/public/post/index.html +++ /dev/null @@ -1,157 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - - <head><title>Posts – Kumar Damani - Home</title> -<meta name="description" content="Git, email, and resume"> - -<meta name="viewport" content="width=device-width, initial-scale=1"> -<meta charset="UTF-8"/> - - - - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.2/css/all.min.css" integrity="sha512-1sCRPdkRXhBV2PBLUdRb4tMg1w2YPf37qatUFeS7zlBy7jJI8Lf4VHwWfZZfpXtYSLy85pkm9GaYVYMfw5BC1A==" crossorigin="anonymous" /> - - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.1/css/academicons.min.css" integrity="sha512-b1ASx0WHgVFL5ZQhTgiPWX+68KjS38Jk87jg7pe+qC7q9YkEtFq0z7xCglv7qGIs/68d3mAp+StfC8WKC5SSAg==" crossorigin="anonymous" /> - - -<link rel="stylesheet" href="https://kumardamani.net/css/palettes/tokyo-night-dark.css"> -<link rel="stylesheet" href="https://kumardamani.net/css/risotto.css"> -<link rel="stylesheet" href="https://kumardamani.net/css/custom.css"> -</head> - - <body> - <div class="page"> - - <header class="page__header"><nav class="page__nav main-nav"> - <ul> - <h1 class="page__logo"><a href="https://kumardamani.net/" class="page__logo-inner">Kumar Damani - Home</a></h1> - - - <li class="main-nav__item"><a class="nav-main-item active" href="https://kumardamani.net/post/" title="Posts">Posts</a></li> - - </ul> -</nav> - -</header> - - <section class="page__body"> - <header class="content__header"> - <h1>Posts</h1> - - </header> - - - <article class="post"> - <header class="post__header"> - <h1><a href="https://kumardamani.net/post/nixos-p1/">Adventures in NixOS - Part 1</a></h1> - <p class="post__meta"> - Kumar Damani, - <span class="date">24 March 2023</span> - </p> - </header> - - <section class="post__summary"> - <p>Almost a guide to getting started with NixOS the modern (2023) way.</p> - </section> - </article> - - <article class="post"> - <header class="post__header"> - <h1><a href="https://kumardamani.net/post/programming-as-art/">Romanticism in Programming</a></h1> - <p class="post__meta"> - Kumar Damani, - <span class="date">29 November 2022</span> - </p> - </header> - - <section class="post__summary"> - <p>Why there is art in programming.</p> - </section> - </article> - - <article class="post"> - <header class="post__header"> - <h1><a href="https://kumardamani.net/post/self-host/">Why do I self-host?</a></h1> - <p class="post__meta"> - Kumar Damani, - <span class="date">12 September 2022</span> - </p> - </header> - - <section class="post__summary"> - <p>My reasons for self-hosting.</p> - </section> - </article> - - <article class="post"> - <header class="post__header"> - <h1><a href="https://kumardamani.net/post/programs/">Programs and Equipment</a></h1> - <p class="post__meta"> - Kumar Damani, - <span class="date">12 November 2021</span> - </p> - </header> - - <section class="post__summary"> - <p>The programs and equipment I use on a daily basis.</p> - </section> - </article> - - - </section> - - <section class="page__aside"> - <div class="aside__about"> -<div class="aside__about"> - <img class="about__logo" src="https://kumardamani.net/images/rice.svg" alt="Logo"> -<h1 class="about__title">Links</h1> -<p class="about__description">Git, email, and resume</p> -</div> - - -<ul class="aside__social-links"> - - <li> - <a href="https://gitlab.com/kdam0/" rel="me" aria-label="GitLab" title="GitLab"><i class="fa-brands fa-gitlab" aria-hidden="true"></i></a> - </li> - - <li> - <a href="mailto:me@kumardamani.net" rel="me" aria-label="Email" title="Email"><i class="fa-solid fa-envelope" aria-hidden="true"></i></a> - </li> - - <li> - <a href="/KumarDamaniCV.pdf" rel="me" aria-label="Resume" title="Resume"><i class="fa-solid fa-file" aria-hidden="true"></i></a> - </li> - -</ul> -</div> - <hr> - <div class="aside__content"> - </div> - </section> - - <footer class="page__footer"><p> - - - - - - - - - - - - -</p> -<br /><br /> -<p class="copyright"></p> -<p class="advertisement">Powered by <a href="https://gohugo.io/">hugo</a> and <a href="https://github.com/joeroe/risotto">risotto</a>.</p> -</footer> - - </div> - </body> - -</html> diff --git a/public/post/index.xml b/public/post/index.xml deleted file mode 100644 index be7d5ab..0000000 --- a/public/post/index.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> - <channel> - <title>Posts on Kumar Damani - Home</title> - <link>https://kumardamani.net/post/</link> - <description>Recent content in Posts on Kumar Damani - Home</description> - <generator>Hugo -- gohugo.io</generator> - <language>en-us</language> - <lastBuildDate>Fri, 24 Mar 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://kumardamani.net/post/index.xml" rel="self" type="application/rss+xml" /> - <item> - <title>Adventures in NixOS - Part 1</title> - <link>https://kumardamani.net/post/nixos-p1/</link> - <pubDate>Fri, 24 Mar 2023 00:00:00 +0000</pubDate> - - <guid>https://kumardamani.net/post/nixos-p1/</guid> - <description><p>Almost a guide to getting started with NixOS the modern (2023) way.</p></description> - </item> - - <item> - <title>Romanticism in Programming</title> - <link>https://kumardamani.net/post/programming-as-art/</link> - <pubDate>Tue, 29 Nov 2022 00:00:00 +0000</pubDate> - - <guid>https://kumardamani.net/post/programming-as-art/</guid> - <description><p>Why there is art in programming.</p></description> - </item> - - <item> - <title>Why do I self-host?</title> - <link>https://kumardamani.net/post/self-host/</link> - <pubDate>Mon, 12 Sep 2022 00:00:00 +0000</pubDate> - - <guid>https://kumardamani.net/post/self-host/</guid> - <description><p>My reasons for self-hosting.</p></description> - </item> - - <item> - <title>Programs and Equipment</title> - <link>https://kumardamani.net/post/programs/</link> - <pubDate>Fri, 12 Nov 2021 00:00:00 +0000</pubDate> - - <guid>https://kumardamani.net/post/programs/</guid> - <description><p>The programs and equipment I use on a daily basis.</p></description> - </item> - - </channel> -</rss> diff --git a/public/post/nixos-p1/boot.png b/public/post/nixos-p1/boot.png Binary files differdeleted file mode 100644 index 4e3d972..0000000 --- a/public/post/nixos-p1/boot.png +++ /dev/null diff --git a/public/post/nixos-p1/dwl.png b/public/post/nixos-p1/dwl.png Binary files differdeleted file mode 100644 index 8ecbe4d..0000000 --- a/public/post/nixos-p1/dwl.png +++ /dev/null diff --git a/public/post/nixos-p1/fox.jpg b/public/post/nixos-p1/fox.jpg Binary files differdeleted file mode 100644 index 3ace57f..0000000 --- a/public/post/nixos-p1/fox.jpg +++ /dev/null diff --git a/public/post/nixos-p1/index.html b/public/post/nixos-p1/index.html deleted file mode 100644 index 54c7ccb..0000000 --- a/public/post/nixos-p1/index.html +++ /dev/null @@ -1,434 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - - <head><title>Adventures in NixOS - Part 1 – Kumar Damani - Home</title> -<meta name="description" content="Git, email, and resume"> - -<meta name="viewport" content="width=device-width, initial-scale=1"> -<meta charset="UTF-8"/> - - - - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.2/css/all.min.css" integrity="sha512-1sCRPdkRXhBV2PBLUdRb4tMg1w2YPf37qatUFeS7zlBy7jJI8Lf4VHwWfZZfpXtYSLy85pkm9GaYVYMfw5BC1A==" crossorigin="anonymous" /> - - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.1/css/academicons.min.css" integrity="sha512-b1ASx0WHgVFL5ZQhTgiPWX+68KjS38Jk87jg7pe+qC7q9YkEtFq0z7xCglv7qGIs/68d3mAp+StfC8WKC5SSAg==" crossorigin="anonymous" /> - - -<link rel="stylesheet" href="https://kumardamani.net/css/palettes/tokyo-night-dark.css"> -<link rel="stylesheet" href="https://kumardamani.net/css/risotto.css"> -<link rel="stylesheet" href="https://kumardamani.net/css/custom.css"> -</head> - - <body> - <div class="page"> - - <header class="page__header"><nav class="page__nav main-nav"> - <ul> - <h1 class="page__logo"><a href="https://kumardamani.net/" class="page__logo-inner">Kumar Damani - Home</a></h1> - - - <li class="main-nav__item"><a class="nav-main-item active" href="https://kumardamani.net/post/" title="Posts">Posts</a></li> - - </ul> -</nav> - -</header> - - <section class="page__body"> - <header class="content__header"> - <h1>Adventures in NixOS - Part 1</h1> - </header> - - <div class="content__body"> - <p>Almost a guide to getting started with NixOS the modern (2023) way.</p> -<p>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.</p> -<p><img src="fox.jpg" alt="meme"></p> -<blockquote> -<p>Warning: NixOS is not exactly beginner friendly - -you should have familiarity installing Linux distros before trying this.</p> -</blockquote> -<h2 id="but-why-nixos">But Why NixOS?</h2> -<p>Eh… FOMO regarding all the <a href="https://www.google.com/search?q=nixos+memes&tbm=isch">memes</a>.</p> -<p>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. <strong>You can’t do this with Ansible.</strong> -This allows you (in theory) to get the benefits of a rolling release as well as the -stability benefits of a traditional distro.</p> -<blockquote> -<p>It takes the idea of reproducible builds, and extends it to the OS.</p> -</blockquote> -<p>For example, NixOS will present you with all previous “builds” at boot time -for you to revert to in case something gets messed up. -<img src="boot.png" alt="boot prompt"></p> -<h2 id="things-i-want-to-explore-as-part-of-this-exercise">Things I want to explore as part of this exercise:</h2> -<ol> -<li>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?</li> -<li>Is Wayland truly ready?</li> -<li>Try out <a href="https://github.com/djpohly/dwl"><code>dwl</code></a> (the Wayland port of <code>dwm</code> by the <a href="https://suckless.org">suckless</a> folks)</li> -</ol> -<h2 id="constraints">Constraints</h2> -<ol> -<li>I want to stick to the “Nix” way of doing things as much as possible -<em>where it makes sense to me</em>.</li> -<li>Stick to Wayland only applications as much as possible.</li> -</ol> -<h2 id="spoilers-end-result">Spoilers! (End result)</h2> -<p><img src="rice.png" alt="my rice"> -(Probably too ugly for r/unixporn, but works for me :)</p> -<h2 id="installation">Installation</h2> -<h3 id="getting-a-live-usb-going">Getting a Live USB going</h3> -<ul> -<li>I used the <a href="https://nixos.org/download.html#nixos-iso">minimal iso</a>.</li> -<li>Create a bootable USB with the usual - <code>sudo dd if=/path/to/iso of=/dev/sdX bs=4M</code>.</li> -<li>Boot up.</li> -<li>Then start following the steps for <a href="https://nixos.org/manual/nixos/stable/index.html#sec-installation-manual">manual installation</a> -from the official guide to complete the install.</li> -</ul> -<blockquote> -<p>Make sure to give SWAP as much space as your memory capacity for hibernation to work properly.</p> -</blockquote> -<blockquote> -<p>Wifi did not work for me out of the box. So I used my phone to tether via USB.</p> -</blockquote> -<h2 id="first-boot">First boot</h2> -<p>If everything went well, you should be presented with a TTY prompting you to login:</p> -<pre tabindex="0"><code>NixOS ... -Login: <your username> -Password: <your password> -</code></pre><p>Once you login, you will still just have a TTY, but we can now go ahead and start -installing our graphical environment.</p> -<h2 id="housekeeping">Housekeeping</h2> -<ul> -<li>You should have two NixOS config files in <code>/etc/nixos/</code>:</li> -</ul> -<pre tabindex="0"><code>configuration.nix -hardware-configuration.nix -</code></pre><ul> -<li> -<p>Edit the <code>configuration.nix</code> file by setting the correct values for hostname, networking, timezone and users. I also add a few basic system-wide packages here such as <code>git, rsync, neovim, htop</code> etc.</p> -</li> -<li> -<p>To <em>apply and use</em> your changes to any of these files you need to run:</p> -</li> -</ul> -<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo nixos-rebuild switch -</span></span></code></pre></div><ul> -<li>Since we want all our configuration to be version controlled, -I copied these files to live under my user’s config: -<code>~/.config/{nix, nixpkgs}/</code>:</li> -</ul> -<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>cp /etc/nix/nix.conf ~/.config/nix/nix.conf -</span></span><span style="display:flex;"><span>cp /etc/nixos/configuration.nix ~/.config/nixpkgs/configuration.nix -</span></span></code></pre></div><p>Nix will now use these user-specific files to read its config :)</p> -<h3 id="flakes-support">Flakes Support</h3> -<p>Nix (the pkg mgr) does not come with Flakes support out-of-the-box. -So we need to enable it:</p> -<ol> -<li>In <code>~/.config/nix/nix.conf</code> add:</li> -</ol> -<pre tabindex="0"><code>experimental-features = nix-command flakes -</code></pre><ol start="2"> -<li>Apply it:</li> -</ol> -<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo nixos-rebuild switch -</span></span></code></pre></div><p>Read about <a href="https://nixos.wiki/wiki/Flakes">Flakes</a>.</p> -<h3 id="home-manager-support">Home Manager Support</h3> -<p>Now we can install the Home-Manager flake.</p> -<ol> -<li>Init our base flake:</li> -</ol> -<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>cd ~/.config/nixpkgs -</span></span><span style="display:flex;"><span>nix flake init -</span></span></code></pre></div><p>This should generate two files:</p> -<pre tabindex="0"><code>flake.nix -flake.lock -</code></pre><ol start="2"> -<li>Next we tell <code>flake.nix</code> to manage all our configuration (system + home) for our system:</li> -</ol> -<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-nix" data-lang="nix"><span style="display:flex;"><span>{ -</span></span><span style="display:flex;"><span> description <span style="color:#f92672">=</span> <span style="color:#e6db74">"NixOS configuration"</span>; -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span> inputs <span style="color:#f92672">=</span> { -</span></span><span style="display:flex;"><span> nixpkgs<span style="color:#f92672">.</span>url <span style="color:#f92672">=</span> <span style="color:#e6db74">"github:nixos/nixpkgs/nixos-unstable"</span>; -</span></span><span style="display:flex;"><span> home-manager<span style="color:#f92672">.</span>url <span style="color:#f92672">=</span> <span style="color:#e6db74">"github:nix-community/home-manager"</span>; -</span></span><span style="display:flex;"><span> home-manager<span style="color:#f92672">.</span>inputs<span style="color:#f92672">.</span>nixpkgs<span style="color:#f92672">.</span>follows <span style="color:#f92672">=</span> <span style="color:#e6db74">"nixpkgs"</span>; -</span></span><span style="display:flex;"><span> nixos-hardware<span style="color:#f92672">.</span>url <span style="color:#f92672">=</span> <span style="color:#e6db74">"github:NixOS/nixos-hardware/master"</span>; -</span></span><span style="display:flex;"><span> }; -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span> outputs <span style="color:#f92672">=</span> inputs<span style="color:#f92672">@</span>{ nixpkgs<span style="color:#f92672">,</span> home-manager<span style="color:#f92672">,</span> nixos-hardware<span style="color:#f92672">,</span> <span style="color:#f92672">...</span> }: { -</span></span><span style="display:flex;"><span> nixosConfigurations <span style="color:#f92672">=</span> { -</span></span><span style="display:flex;"><span> <span style="color:#75715e"># Change below to use your hostname from configuration.nix</span> -</span></span><span style="display:flex;"><span> <span style="color:#e6db74">"art-sr"</span> <span style="color:#f92672">=</span> nixpkgs<span style="color:#f92672">.</span>lib<span style="color:#f92672">.</span>nixosSystem { -</span></span><span style="display:flex;"><span> system <span style="color:#f92672">=</span> <span style="color:#e6db74">"x86_64-linux"</span>; -</span></span><span style="display:flex;"><span> modules <span style="color:#f92672">=</span> [ -</span></span><span style="display:flex;"><span> <span style="color:#e6db74">./configuration.nix</span> -</span></span><span style="display:flex;"><span> nixos-hardware<span style="color:#f92672">.</span>nixosModules<span style="color:#f92672">.</span>framework -</span></span><span style="display:flex;"><span> home-manager<span style="color:#f92672">.</span>nixosModules<span style="color:#f92672">.</span>home-manager -</span></span><span style="display:flex;"><span> { -</span></span><span style="display:flex;"><span> home-manager<span style="color:#f92672">.</span>useGlobalPkgs <span style="color:#f92672">=</span> <span style="color:#66d9ef">true</span>; -</span></span><span style="display:flex;"><span> home-manager<span style="color:#f92672">.</span>useUserPackages <span style="color:#f92672">=</span> <span style="color:#66d9ef">true</span>; -</span></span><span style="display:flex;"><span> <span style="color:#75715e"># Change below to use your username from configuration.nix</span> -</span></span><span style="display:flex;"><span> home-manager<span style="color:#f92672">.</span>users<span style="color:#f92672">.</span>kdam0 <span style="color:#f92672">=</span> <span style="color:#f92672">import</span> <span style="color:#e6db74">./home.nix</span>; -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span> <span style="color:#75715e"># Optionally, use home-manager.extraSpecialArgs to pass</span> -</span></span><span style="display:flex;"><span> <span style="color:#75715e"># arguments to home.nix</span> -</span></span><span style="display:flex;"><span> } -</span></span><span style="display:flex;"><span> ]; -</span></span><span style="display:flex;"><span> }; -</span></span><span style="display:flex;"><span> }; -</span></span><span style="display:flex;"><span> }; -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><blockquote> -<p>“art-sr” is my hostname for this machine.</p> -</blockquote> -<p>In my case, I also have the following two lines specifically to load settings for my hardware:</p> -<pre tabindex="0"><code> nixos-hardware.url = "github:NixOS/nixos-hardware/master"; - ... - nixos-hardware.nixosModules.framework -</code></pre><p>you will need to modify these values based on your <a href="https://github.com/NixOS/nixos-hardware">hardware support</a>.</p> -<ol start="3"> -<li>Create a <code>~/.config/nixpkgs/home.nix</code> file with your values:</li> -</ol> -<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-nix" data-lang="nix"><span style="display:flex;"><span>{ config<span style="color:#f92672">,</span> pkgs<span style="color:#f92672">,</span> <span style="color:#f92672">...</span>}: -</span></span><span style="display:flex;"><span>{ -</span></span><span style="display:flex;"><span> home<span style="color:#f92672">.</span>username <span style="color:#f92672">=</span> <span style="color:#e6db74">"kdam0"</span>; -</span></span><span style="display:flex;"><span> home<span style="color:#f92672">.</span>homeDirectory <span style="color:#f92672">=</span> <span style="color:#e6db74">"/home/kdam0"</span>; -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span> programs<span style="color:#f92672">.</span>home-manager<span style="color:#f92672">.</span>enable <span style="color:#f92672">=</span> <span style="color:#66d9ef">true</span>; -</span></span><span style="display:flex;"><span> home<span style="color:#f92672">.</span>stateVersion <span style="color:#f92672">=</span> <span style="color:#e6db74">"22.11"</span>; -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span> services<span style="color:#f92672">.</span>gpg-agent <span style="color:#f92672">=</span> { -</span></span><span style="display:flex;"><span> enable <span style="color:#f92672">=</span> <span style="color:#66d9ef">true</span>; -</span></span><span style="display:flex;"><span> defaultCacheTtl <span style="color:#f92672">=</span> <span style="color:#ae81ff">1800</span>; -</span></span><span style="display:flex;"><span> enableSshSupport <span style="color:#f92672">=</span> <span style="color:#66d9ef">true</span>; -</span></span><span style="display:flex;"><span> }; -</span></span><span style="display:flex;"><span>} -</span></span></code></pre></div><ol start="4"> -<li>Apply:</li> -</ol> -<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo nixos-rebuild switch -</span></span></code></pre></div><blockquote> -<p>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.</p> -</blockquote> -<p>Read about <a href="https://nix-community.github.io/home-manager/index.html#ch-nix-flakes">Home Manager flake</a>.</p> -<p><strong>This would be a good time init a git repo in <code>~/.config/nixpkgs/</code> and publish your progress.</strong></p> -<h2 id="setting-up-the-gui">Setting up the GUI</h2> -<h3 id="window-manager--bar--system-info">Window Manager + bar + system info.</h3> -<p>Getting <code>dwl</code> is easy enough. In my <code>home.nix</code>:</p> -<pre tabindex="0"><code> home.packages = [ - pkgs.dwl - ... - ]; -</code></pre><p>This will install <code>dwl</code> on a rebuild. -Then I can run it with <code>dwl</code>.</p> -<p>Oh it fails…something about permissions… -In <code>~/.config/nixpkgs/configuration.nix</code> make sure you have:</p> -<pre tabindex="0"><code> security.polkit.enable = true; -</code></pre><p>Oh it fails again with GLE errors :( Add:</p> -<pre tabindex="0"><code> hardware.opengl = { - enable = true; - driSupport = true; - }; -</code></pre><p><strong>Sweet now it launches!</strong></p> -<p>But of course I need to configure the keys - that’s the whole point of a WM. -Additionally, <code>dwl</code> requires a re-build on every config change…</p> -<p><strong>How do I tell Nix to use my config file while installing/building <code>dwl</code>?</strong></p> -<p>Lucking all packages (<code>pkgs.*</code>) build files are defined on their GitHub. -We can see that we are allowed to pass in a <code>conf</code> argument to -<a href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/window-managers/dwl/default.nix">this</a> -file.</p> -<p>After a bit of digging around, I arrived at how to do it:</p> -<ol> -<li>First copy your <code>config.h</code> to <code>~/.config/nixpkgs/dwl/config.h</code>.</li> -<li>Then point to it in your <code>home.nix</code>:</li> -</ol> -<pre tabindex="0"><code> 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; - }) - ... - ]; -</code></pre><blockquote> -<p>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.</p> -</blockquote> -<p>Of course since <code>dwl</code> 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 <code>somebar</code>:</p> -<pre tabindex="0"><code> home.packages = [ - ... - pkgs.somebar - ... - ]; -</code></pre><p>If you want status info on your bar you can use something like <code>someblocks</code> - 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.</p> -<p>Oh but you probably don’t have <code>make</code> or any requirements to actually build it…fear not:</p> -<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>nix-shell -p gnumake -</span></span></code></pre></div><p>which put you in a temporary environment with all the common build tools available. -Now you can:</p> -<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo make install -</span></span></code></pre></div><p><code>wbg</code> is a simple background setter for Wayland……aaaand BAM!</p> -<p><img src="dwl.png" alt="dwl pic"></p> -<h3 id="terminal">Terminal</h3> -<p>I use <a href="https://codeberg.org/dnkl/foot"><code>foot</code></a>.</p> -<p>Create the config file in <code>~/.config/nixpkgs/foot/foot.ini</code>:</p> -<pre tabindex="0"><code># for transparency # -[colors] -alpha=0.7 -</code></pre><p>Use it in <code>home.nix</code>:</p> -<pre tabindex="0"><code> home.file.".config/foot/foot.ini".source = ../../common/foot/foot.ini; -</code></pre><blockquote> -<p>I use this pattern for pretty much all my <em>dotfiles</em>:</p> -</blockquote> -<pre tabindex="0"><code> # 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; -</code></pre><h3 id="sound">Sound</h3> -<p>In my <code>configuration.nix</code>:</p> -<pre tabindex="0"><code> 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; - }; -</code></pre><h3 id="nextcloud">Nextcloud</h3> -<p>I want a purely CLI way to handle this, and a periodic sync is sufficient for me. -We do this with <code>systemd-timers</code> (Nix advises against <code>cron</code>). -In my <code>home.nix</code>:</p> -<pre tabindex="0"><code> 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; -</code></pre><h2 id="conclusions">Conclusions</h2> -<ol> -<li>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 <em>so grateful</em> 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.</li> -<li>You bet Wayland is ready. Multi-monitor works out-of-the-box, -all my apps support it, and things just <em>feel</em> more polished than I have ever felt with Xorg.</li> -<li><code>dwl</code> is as awesome as I had hoped! This is my daily driver now.</li> -</ol> -<h2 id="my-configs">My configs</h2> -<p>All the configs discussed (and more) are in my <a href="https://gitlab.com/kdam0/dotfiles-nix">nixdotfiles repo</a>.</p> - </div> - <footer class="content__footer"></footer> - - </section> - - <section class="page__aside"> - <div class="aside__about"> -<div class="aside__about"> - <img class="about__logo" src="https://kumardamani.net/images/rice.svg" alt="Logo"> -<h1 class="about__title">Links</h1> -<p class="about__description">Git, email, and resume</p> -</div> - - -<ul class="aside__social-links"> - - <li> - <a href="https://gitlab.com/kdam0/" rel="me" aria-label="GitLab" title="GitLab"><i class="fa-brands fa-gitlab" aria-hidden="true"></i></a> - </li> - - <li> - <a href="mailto:me@kumardamani.net" rel="me" aria-label="Email" title="Email"><i class="fa-solid fa-envelope" aria-hidden="true"></i></a> - </li> - - <li> - <a href="/KumarDamaniCV.pdf" rel="me" aria-label="Resume" title="Resume"><i class="fa-solid fa-file" aria-hidden="true"></i></a> - </li> - -</ul> -</div> - <hr> - <div class="aside__content"> - <p>Guide to getting started with NixOS the modern way.</p> - - <p> - By Kumar Damani, - 2023-03-24 - </p> - - - - - </div> - </section> - - <footer class="page__footer"><p> - - - - - - - - - - -</p> -<br /><br /> -<p class="copyright"></p> -<p class="advertisement">Powered by <a href="https://gohugo.io/">hugo</a> and <a href="https://github.com/joeroe/risotto">risotto</a>.</p> -</footer> - - </div> - </body> - -</html> diff --git a/public/post/nixos-p1/rice.png b/public/post/nixos-p1/rice.png Binary files differdeleted file mode 100644 index 4fd97cf..0000000 --- a/public/post/nixos-p1/rice.png +++ /dev/null diff --git a/public/post/programming-as-art/code.png b/public/post/programming-as-art/code.png Binary files differdeleted file mode 100644 index 30c3522..0000000 --- a/public/post/programming-as-art/code.png +++ /dev/null diff --git a/public/post/programming-as-art/index.html b/public/post/programming-as-art/index.html deleted file mode 100644 index 32ff96c..0000000 --- a/public/post/programming-as-art/index.html +++ /dev/null @@ -1,179 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - - <head><title>Romanticism in Programming – Kumar Damani - Home</title> -<meta name="description" content="Git, email, and resume"> - -<meta name="viewport" content="width=device-width, initial-scale=1"> -<meta charset="UTF-8"/> - -<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.css" integrity="sha384-vKruj+a13U8yHIkAyGgK1J3ArTLzrFGBbBc0tDp4ad/EyewESeXE/Iv67Aj8gKZ0" crossorigin="anonymous"> -<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.js" integrity="sha384-PwRUT/YqbnEjkZO0zZxNqcxACrXe+j766U2amXcgMg5457rve2Y7I6ZJSm2A0mS4" crossorigin="anonymous"></script> -<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous" - onload="renderMathInElement(document.body);"></script> -<script> - document.addEventListener("DOMContentLoaded", function() { - renderMathInElement(document.body, { - delimiters: [ - {left: "$$", right: "$$", display: true}, - {left: "$", right: "$", display: false} - ] - }); - }); -</script> - - - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.2/css/all.min.css" integrity="sha512-1sCRPdkRXhBV2PBLUdRb4tMg1w2YPf37qatUFeS7zlBy7jJI8Lf4VHwWfZZfpXtYSLy85pkm9GaYVYMfw5BC1A==" crossorigin="anonymous" /> - - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.1/css/academicons.min.css" integrity="sha512-b1ASx0WHgVFL5ZQhTgiPWX+68KjS38Jk87jg7pe+qC7q9YkEtFq0z7xCglv7qGIs/68d3mAp+StfC8WKC5SSAg==" crossorigin="anonymous" /> - - -<link rel="stylesheet" href="https://kumardamani.net/css/palettes/tokyo-night-dark.css"> -<link rel="stylesheet" href="https://kumardamani.net/css/risotto.css"> -<link rel="stylesheet" href="https://kumardamani.net/css/custom.css"> -</head> - - <body> - <div class="page"> - - <header class="page__header"><nav class="page__nav main-nav"> - <ul> - <h1 class="page__logo"><a href="https://kumardamani.net/" class="page__logo-inner">Kumar Damani - Home</a></h1> - - - <li class="main-nav__item"><a class="nav-main-item active" href="https://kumardamani.net/post/" title="Posts">Posts</a></li> - - </ul> -</nav> - -</header> - - <section class="page__body"> - <header class="content__header"> - <h1>Romanticism in Programming</h1> - </header> - - <div class="content__body"> - <p>Why there is art in programming.</p> -<p>During my early days as a CS student, one of the first mind-blowing moments was -watching <code>Hello World!</code> getting printed out to the console thousands of times -in just two functional lines of code.</p> -<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-python" data-lang="python"><span style="display:flex;"><span><span style="color:#66d9ef">for</span> _ <span style="color:#f92672">in</span> range(<span style="color:#ae81ff">1</span>, <span style="color:#ae81ff">1001</span>): -</span></span><span style="display:flex;"><span> print(<span style="color:#e6db74">"Hello World!"</span>) -</span></span></code></pre></div><p>At the time it felt like having the <a href="https://harry-potter-compendium.fandom.com/wiki/Elder_Wand">Elder Wand</a>. -<img src="wand.png" alt="Dumbledore with Elder Wand pic"></p> -<p>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:</p> -<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-python" data-lang="python"><span style="display:flex;"><span>sum <span style="color:#f92672">=</span> <span style="color:#ae81ff">0</span> -</span></span><span style="display:flex;"><span><span style="color:#66d9ef">for</span> i <span style="color:#f92672">in</span> range(<span style="color:#ae81ff">1</span>, <span style="color:#ae81ff">100</span><span style="color:#f92672">+</span><span style="color:#ae81ff">1</span>): -</span></span><span style="display:flex;"><span> sum <span style="color:#f92672">=</span> sum <span style="color:#f92672">+</span> i -</span></span></code></pre></div><p>Sure enough we saw the answer <code>5050</code> in the console. -But then the TA reminds us that we are making our computers <strong>work too hard</strong>. -In other words, the computer needs to do one-hundred ADD instructions in order to make this computation happen.</p> -<p>What if the number was a million? How well would our method scale?</p> -<p>Well then it would take a million ADD instructions. -We call this scaling <em>linearly</em> with the input size. -Later we would formalize this to $\mathcal{O}(n)$ (pronounced: <em>Big Oh of N</em>).</p> -<p>The TA hinted that there is a better way, and that we already know of the better way in math.</p> -<p><img src="teaching.png" alt="Teaching meme"></p> -<p>$\displaystyle S_n = \sum\limits_{i=1}^n i = 1 + 2 + … + n = \frac{n (n + 1)}{2}$</p> -<p>With this we are no longer using loops, but a known mathematical fact about sequences. -If you don’t belive me, see the <a href="https://letstalkscience.ca/educational-resources/backgrounders/gauss-summation">proof</a>.</p> -<p>Written as code:</p> -<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-python" data-lang="python"><span style="display:flex;"><span>sum <span style="color:#f92672">=</span> n (n <span style="color:#f92672">+</span> <span style="color:#ae81ff">1</span>) <span style="color:#f92672">/</span> <span style="color:#ae81ff">2</span> -</span></span></code></pre></div><p>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 -<strong>no matter the input, it always takes 3 instructions to compute!</strong> -This is a HUGE win!</p> -<p><img src="math.png" alt="Math meme"></p> -<p>Later we would formalize this to $\mathcal{O}(1)$, or <em>constant</em> scaling.</p> -<blockquote> -<p>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.</p> -</blockquote> -<p>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 <em>working so hard</em>.</p> -<p>Objectively, the first solution is more readable, and friendly to a new observer than the second.</p> -<p><em>Why then am I still so drawn to the second solution?</em></p> -<p>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 <em>romantic</em>.</p> -<p>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>code</code>. -<img src="code.png" alt="The Matrix code going by image"></p> -<p>Programming is not quite as <em>objective</em> 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 <em>art</em>.</p> - </div> - <footer class="content__footer"></footer> - - </section> - - <section class="page__aside"> - <div class="aside__about"> -<div class="aside__about"> - <img class="about__logo" src="https://kumardamani.net/images/rice.svg" alt="Logo"> -<h1 class="about__title">Links</h1> -<p class="about__description">Git, email, and resume</p> -</div> - - -<ul class="aside__social-links"> - - <li> - <a href="https://gitlab.com/kdam0/" rel="me" aria-label="GitLab" title="GitLab"><i class="fa-brands fa-gitlab" aria-hidden="true"></i></a> - </li> - - <li> - <a href="mailto:me@kumardamani.net" rel="me" aria-label="Email" title="Email"><i class="fa-solid fa-envelope" aria-hidden="true"></i></a> - </li> - - <li> - <a href="/KumarDamaniCV.pdf" rel="me" aria-label="Resume" title="Resume"><i class="fa-solid fa-file" aria-hidden="true"></i></a> - </li> - -</ul> -</div> - <hr> - <div class="aside__content"> - <p>How programming is romantic.</p> - - <p> - By Kumar Damani, - 2022-11-29 - </p> - - - - - </div> - </section> - - <footer class="page__footer"><p> - - - - - - - - - - -</p> -<br /><br /> -<p class="copyright"></p> -<p class="advertisement">Powered by <a href="https://gohugo.io/">hugo</a> and <a href="https://github.com/joeroe/risotto">risotto</a>.</p> -</footer> - - </div> - </body> - -</html> diff --git a/public/post/programming-as-art/math.png b/public/post/programming-as-art/math.png Binary files differdeleted file mode 100644 index bbdc372..0000000 --- a/public/post/programming-as-art/math.png +++ /dev/null diff --git a/public/post/programming-as-art/teaching.png b/public/post/programming-as-art/teaching.png Binary files differdeleted file mode 100644 index 9bf5dce..0000000 --- a/public/post/programming-as-art/teaching.png +++ /dev/null diff --git a/public/post/programming-as-art/wand.png b/public/post/programming-as-art/wand.png Binary files differdeleted file mode 100644 index 5eefc9c..0000000 --- a/public/post/programming-as-art/wand.png +++ /dev/null diff --git a/public/post/programs/index.html b/public/post/programs/index.html deleted file mode 100644 index 067706d..0000000 --- a/public/post/programs/index.html +++ /dev/null @@ -1,167 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - - <head><title>Programs and Equipment – Kumar Damani - Home</title> -<meta name="description" content="Git, email, and resume"> - -<meta name="viewport" content="width=device-width, initial-scale=1"> -<meta charset="UTF-8"/> - - - - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.2/css/all.min.css" integrity="sha512-1sCRPdkRXhBV2PBLUdRb4tMg1w2YPf37qatUFeS7zlBy7jJI8Lf4VHwWfZZfpXtYSLy85pkm9GaYVYMfw5BC1A==" crossorigin="anonymous" /> - - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.1/css/academicons.min.css" integrity="sha512-b1ASx0WHgVFL5ZQhTgiPWX+68KjS38Jk87jg7pe+qC7q9YkEtFq0z7xCglv7qGIs/68d3mAp+StfC8WKC5SSAg==" crossorigin="anonymous" /> - - -<link rel="stylesheet" href="https://kumardamani.net/css/palettes/tokyo-night-dark.css"> -<link rel="stylesheet" href="https://kumardamani.net/css/risotto.css"> -<link rel="stylesheet" href="https://kumardamani.net/css/custom.css"> -</head> - - <body> - <div class="page"> - - <header class="page__header"><nav class="page__nav main-nav"> - <ul> - <h1 class="page__logo"><a href="https://kumardamani.net/" class="page__logo-inner">Kumar Damani - Home</a></h1> - - - <li class="main-nav__item"><a class="nav-main-item active" href="https://kumardamani.net/post/" title="Posts">Posts</a></li> - - </ul> -</nav> - -</header> - - <section class="page__body"> - <header class="content__header"> - <h1>Programs and Equipment</h1> - </header> - - <div class="content__body"> - <p>The programs and equipment I use on a daily basis.</p> -<h1 id="programs-and-equipment-i-use">Programs and Equipment I Use</h1> -<p>I’m about getting things done quickly and having as little space between -my thoughts and actions on the computer.</p> -<p>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.</p> -<h2 id="software-i-use">Software I Use</h2> -<h3 id="os-distribution">OS Distribution</h3> -<p><a href="https://manjaro.org/">Manjaro</a> (stable) though this is a bit of a moot point since there’s been a lot of convergence among the -popular distros recently especially since they all offer some dedicated channel for getting up-to-date -software. The real day-to-day difference to workflow comes from the choice of desktop environment. -I do like Debian, and Fedora as well.</p> -<h3 id="desktop-environment">Desktop Environment</h3> -<p>I’ve settled on <a href="https://kde.org/plasma-desktop/">KDE Plasma</a> w/ Wayland after many years of hopping. -Plasma comes with all the tools you’d expect to see in a modern desktop, -and for the most part these tools are perfectly capable of doing the task they are meant to do. -Prior to KDE, I’ve used Dwm/Bsmpw + Sxhkd, i3 etc. I’m glad these exist and people get -use out of it, but for now I do not miss it - I’m sure that will eventually change too.</p> -<p><img src="https://upload.wikimedia.org/wikipedia/commons/d/d8/KDE_Plasma_5.25_screenshot.png" alt="KDE Plasma"></p> -<h3 id="text-editor">Text Editor</h3> -<p><a href="https://neovim.io/">(neo)vim</a>. 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.</p> -<p><img src="https://neovim.io/images/showcase/telescope_helptags.png" alt="Neovim"></p> -<h3 id="web-browser">Web Browser</h3> -<p><a href="https://www.mozilla.org/en-US/firefox/features/">Firefox</a> / -<a href="https://brave.com">Brave</a> / -<a href="https://vivaldi.com">Vivaldi</a>. -I have tried, Chromium, Qutebrowser in the past.</p> -<h3 id="file-manager">File Manager</h3> -<p><a href="https://github.com/jarun/nnn">nnn</a>. Yes, I have used ranger.</p> -<p><img src="http://i.imgur.com/kOld6HT.gif" alt="nnn"></p> -<h2 id="where-can-i-find-good-software-options">Where can I find good software options?</h2> -<p>The program of your dreams is probably listed below:</p> -<ul> -<li>The <a href="https://suckless.org/rocks/">suckless</a> website’s list of programs that “rock”. -Generally minimalist programs.</li> -<li>A more comprehensive <a href="https://github.com/mayfrost/guides/blob/master/ALTERNATIVES.md">list</a> -of minimalist software.</li> -<li><a href="https://directory.fsf.org/wiki/Main_Page">FSF’s Free Software Directory</a>. -Emphasis on libre software (although most software in the links above will have free licenses as well).</li> -<li><a href="https://wiki.installgentoo.com/index.php/List_of_recommended_GNU/Linux_software">Gentoo Wiki Recommendations</a> -A good mix of programs for novices and advanced users.</li> -</ul> -<h2 id="hardware-i-use">Hardware I Use</h2> -<h3 id="laptop">Laptop</h3> -<p>The main laptop I use is the <a href="https://frame.work/">Framework laptop</a>. -I’m a huge fan of the whole upgradability concept coming from a few generations of ThinkPads.</p> -<h2 id="what-i-dont-use">What I don’t use</h2> -<p>Proprietary software.</p> -<p>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 <strong>that’s the point</strong>.</p> -<p>There are philosophical reasons for this I’ll talk about in time, but for now, -suffice it to say I will not endorse the usage of proprietary software.</p> - </div> - <footer class="content__footer"></footer> - - </section> - - <section class="page__aside"> - <div class="aside__about"> -<div class="aside__about"> - <img class="about__logo" src="https://kumardamani.net/images/rice.svg" alt="Logo"> -<h1 class="about__title">Links</h1> -<p class="about__description">Git, email, and resume</p> -</div> - - -<ul class="aside__social-links"> - - <li> - <a href="https://gitlab.com/kdam0/" rel="me" aria-label="GitLab" title="GitLab"><i class="fa-brands fa-gitlab" aria-hidden="true"></i></a> - </li> - - <li> - <a href="mailto:me@kumardamani.net" rel="me" aria-label="Email" title="Email"><i class="fa-solid fa-envelope" aria-hidden="true"></i></a> - </li> - - <li> - <a href="/KumarDamaniCV.pdf" rel="me" aria-label="Resume" title="Resume"><i class="fa-solid fa-file" aria-hidden="true"></i></a> - </li> - -</ul> -</div> - <hr> - <div class="aside__content"> - <p>Overview for the programs and equipment I use day-to-day.</p> - - <p> - By Kumar Damani, - 2021-11-12 - </p> - - - - - </div> - </section> - - <footer class="page__footer"><p> - - - - - - - - - - -</p> -<br /><br /> -<p class="copyright"></p> -<p class="advertisement">Powered by <a href="https://gohugo.io/">hugo</a> and <a href="https://github.com/joeroe/risotto">risotto</a>.</p> -</footer> - - </div> - </body> - -</html> diff --git a/public/post/self-host/6imv05.jpg b/public/post/self-host/6imv05.jpg Binary files differdeleted file mode 100644 index d042d7a..0000000 --- a/public/post/self-host/6imv05.jpg +++ /dev/null diff --git a/public/post/self-host/elections.jpg b/public/post/self-host/elections.jpg Binary files differdeleted file mode 100644 index ac4ac96..0000000 --- a/public/post/self-host/elections.jpg +++ /dev/null diff --git a/public/post/self-host/freedom.jpg b/public/post/self-host/freedom.jpg Binary files differdeleted file mode 100644 index d62048a..0000000 --- a/public/post/self-host/freedom.jpg +++ /dev/null diff --git a/public/post/self-host/index.html b/public/post/self-host/index.html deleted file mode 100644 index f1ec3b7..0000000 --- a/public/post/self-host/index.html +++ /dev/null @@ -1,240 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - - <head><title>Why do I self-host? – Kumar Damani - Home</title> -<meta name="description" content="Git, email, and resume"> - -<meta name="viewport" content="width=device-width, initial-scale=1"> -<meta charset="UTF-8"/> - - - - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.2/css/all.min.css" integrity="sha512-1sCRPdkRXhBV2PBLUdRb4tMg1w2YPf37qatUFeS7zlBy7jJI8Lf4VHwWfZZfpXtYSLy85pkm9GaYVYMfw5BC1A==" crossorigin="anonymous" /> - - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.1/css/academicons.min.css" integrity="sha512-b1ASx0WHgVFL5ZQhTgiPWX+68KjS38Jk87jg7pe+qC7q9YkEtFq0z7xCglv7qGIs/68d3mAp+StfC8WKC5SSAg==" crossorigin="anonymous" /> - - -<link rel="stylesheet" href="https://kumardamani.net/css/palettes/tokyo-night-dark.css"> -<link rel="stylesheet" href="https://kumardamani.net/css/risotto.css"> -<link rel="stylesheet" href="https://kumardamani.net/css/custom.css"> -</head> - - <body> - <div class="page"> - - <header class="page__header"><nav class="page__nav main-nav"> - <ul> - <h1 class="page__logo"><a href="https://kumardamani.net/" class="page__logo-inner">Kumar Damani - Home</a></h1> - - - <li class="main-nav__item"><a class="nav-main-item active" href="https://kumardamani.net/post/" title="Posts">Posts</a></li> - - </ul> -</nav> - -</header> - - <section class="page__body"> - <header class="content__header"> - <h1>Why do I self-host?</h1> - </header> - - <div class="content__body"> - <p>My reasons for self-hosting.</p> -<h2 id="digital-freedomindependence">Digital freedom/independence</h2> -<p><img src="freedom.jpg" alt="Freedeom pic"></p> -<p>To put it simply, if you use a service such as Lastpass, iCloud, Dropbox, GDrive, OneDrive, etc. -to store your data, <strong>you do not own it</strong>.</p> -<p>You are <em>trusting</em> 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:</p> -<ul> -<li>Corp. X could vanish/close/“declare bankruptcy” (as with many crypto corps. lately), and you lose your data.</li> -<li>Corp. X could make a policy change and lock you out from accessing your account.</li> -<li>Or you could “forget” to pay the bills a few times and get locked out.</li> -<li>Corp. X could get hacked, and your data gets stolen. This is the latest trend!</li> -<li>Many other doomsday 💀 scenarios.</li> -</ul> -<p>Personally, I don’t feel comfortable depending on the existence of corp. X <em>for data that is important to -me</em> 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.</p> -<h2 id="privacy">Privacy</h2> -<p>Normies often ask me some variation of:</p> -<ul> -<li>Why do I care if corp. X has my data? I have nothing to hide!</li> -<li>Since I’m aware of targeted advertising, it won’t work on me, -so why should I care if corp. X has my data?</li> -</ul> -<figure><img src="why.jpg" - alt="my pic" width="75%"/> -</figure> - -<p>To such questions, I follow-up with:</p> -<blockquote> -<p><strong>Do you want to contribute to a dystopian (<a href="https://en.wikipedia.org/wiki/Orwellian">Orwellian</a> future?</strong></p> -</blockquote> -<figure><img src="police.jpg" - alt="thought police" width="75%"/> -</figure> - -<p>If your answer is <em>yes</em>, then no need to read further, the following will not change your mind.</p> -<p>If your answer is <em>no</em>, but you aren’t convinced that/how these are related, -then the <em>argument goes something like this…</em></p> -<ul> -<li>We live in a world of mass data-collection/surveillance.</li> -<li>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.</li> -<li>That by itself is not a problem here.</li> -<li>The problems arise when corp. X use these techniques for profit without -regard for the harm they cause at a <em>population level</em>.</li> -</ul> -<p>I have unfortunately lived through enough of these cases to be able to cite a few recent examples:</p> -<ul> -<li> -<p>Instagram (etc.) designs its apps/products optimizing for maximum <cite> addiction<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup></cite>. -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 <em>your usage</em> enables platforms -to target not only you, but <em>all</em> users on the platform, including the most vulnerable.</p> -<p>Unfortunately, many of these kids will end up suffering from mental-health, -body-image, self-esteem <cite>issues<sup id="fnref:2"><a href="#fn:2" class="footnote-ref" role="doc-noteref">2</a></sup></cite>, -and for some it <strong>will be fatal</strong>. -I do not think this is morally acceptable, and is primary reason I refuse -to participate in social-media platforms.</p> -<p><img src="6imv05.jpg" alt="Depression"></p> -</li> -</ul> -<p>You could say “well that’s due to bad parenting”, but the point remains that -more and more of the digital world is having <em>real world</em> negative consequences regardless of -your individual participation level. Another example:</p> -<ul> -<li> -<p>By now its well known that Facebook’s (etc.) targeted advertising -played a significant a role in the 2016 US <cite>Elections<sup id="fnref:3"><a href="#fn:3" class="footnote-ref" role="doc-noteref">3</a></sup></cite>. -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 <em>individual</em> Facebook usage, which -undermines the very purpose of a democratic republic. -Regardless of your political affiliation, it should worry you that this <em>can</em> happen.</p> -<p><img src="elections.jpg" alt="Elections"></p> -</li> -</ul> -<p>To summarize, it might not be a problem if individuals disregard their -privacy at the individual level, but in aggregate, a <em>population-wide</em> disregard -has dystopian consequences.</p> -<p>So the question you have to ask yourself is:</p> -<blockquote> -<p><strong>What can I do?</strong></p> -</blockquote> -<p>Start by <strong>valuing your privacy</strong>. -Then, follow some of these tips to <em>say no…</em></p> -<ul> -<li><strong>Limit your exposure to these services.</strong> If a friend stops talking to you because -of this, then congratulations, you’ve just gotten rid of a fake friend. You’re welcome.</li> -<li><a href="https://wiki.r-selfhosted.com/getting-started/what-is-self-hosting/">Self-host</a> -as much as you can. -You can see how I <a href="https://gitlab.com/kdam0/vps">implement</a> this and replicate it yourself, -though it is a bit involved for normies.</li> -<li>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 <a href="https://github.com/awesome-selfhosted/awesome-selfhosted">this</a> -as a starting point and try to search (Ctrl+f) for your service. For eg. Twitter, and -Instagram both have popular options available.</li> -<li><strong>Stop using Chrome.</strong> If you must use it, use <a href="https://brave.com/">Brave</a> instead. -I advocate for <a href="https://www.mozilla.org/en-US/firefox/new/?redirect_source=firefox-com">Firefox</a>. -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 <a href="https://ublockorigin.com/">UBlock Origin</a> -on both of them. Don’t forget to do the same on your mobile device!</li> -<li>Things get more complicated on cell-phones. -I suggest switching to a privacy respecting operating-system such as <a href="https://grapheneos.org/">GrapheneOS</a> -Short of this, you can only limit your usage.</li> -<li>Support government policies that respect user-privacy.</li> -</ul> -<figure><img src="office.png" - alt="office pic" width="75%"/> -</figure> - -<div class="footnotes" role="doc-endnotes"> -<hr> -<ol> -<li id="fn:1"> -<p><a href="https://sitn.hms.harvard.edu/flash/2018/dopamine-smartphones-battle-time/">Smartphones and dopamine</a> <a href="#fnref:1" class="footnote-backref" role="doc-backlink">↩︎</a></p> -</li> -<li id="fn:2"> -<p><a href="https://onlinedegrees.unr.edu/online-master-of-public-health/impact-of-social-media-on-youth-mental-health/">Mental health and social media</a> <a href="#fnref:2" class="footnote-backref" role="doc-backlink">↩︎</a></p> -</li> -<li id="fn:3"> -<p><a href="https://www.theverge.com/2017/12/11/16761016/former-facebook-exec-ripping-apart-society">Excerpt from Facebook ex-exec</a> <a href="#fnref:3" class="footnote-backref" role="doc-backlink">↩︎</a></p> -</li> -</ol> -</div> - </div> - <footer class="content__footer"></footer> - - </section> - - <section class="page__aside"> - <div class="aside__about"> -<div class="aside__about"> - <img class="about__logo" src="https://kumardamani.net/images/rice.svg" alt="Logo"> -<h1 class="about__title">Links</h1> -<p class="about__description">Git, email, and resume</p> -</div> - - -<ul class="aside__social-links"> - - <li> - <a href="https://gitlab.com/kdam0/" rel="me" aria-label="GitLab" title="GitLab"><i class="fa-brands fa-gitlab" aria-hidden="true"></i></a> - </li> - - <li> - <a href="mailto:me@kumardamani.net" rel="me" aria-label="Email" title="Email"><i class="fa-solid fa-envelope" aria-hidden="true"></i></a> - </li> - - <li> - <a href="/KumarDamaniCV.pdf" rel="me" aria-label="Resume" title="Resume"><i class="fa-solid fa-file" aria-hidden="true"></i></a> - </li> - -</ul> -</div> - <hr> - <div class="aside__content"> - <p>Overview of why I self-host.</p> - - <p> - By Kumar Damani, - 2022-09-12 - </p> - - - - - </div> - </section> - - <footer class="page__footer"><p> - - - - - - - - - - -</p> -<br /><br /> -<p class="copyright"></p> -<p class="advertisement">Powered by <a href="https://gohugo.io/">hugo</a> and <a href="https://github.com/joeroe/risotto">risotto</a>.</p> -</footer> - - </div> - </body> - -</html> diff --git a/public/post/self-host/office.png b/public/post/self-host/office.png Binary files differdeleted file mode 100644 index 9cff3ce..0000000 --- a/public/post/self-host/office.png +++ /dev/null diff --git a/public/post/self-host/police.jpg b/public/post/self-host/police.jpg Binary files differdeleted file mode 100644 index dde2b44..0000000 --- a/public/post/self-host/police.jpg +++ /dev/null diff --git a/public/post/self-host/why.jpg b/public/post/self-host/why.jpg Binary files differdeleted file mode 100644 index eda5402..0000000 --- a/public/post/self-host/why.jpg +++ /dev/null |
