diff options
| author | Mitja Felicijan <m@mitjafelicijan.com> | 2023-07-08 23:25:41 +0200 |
|---|---|---|
| committer | Mitja Felicijan <m@mitjafelicijan.com> | 2023-07-08 23:25:41 +0200 |
| commit | cd6644ea4ddc78597934ab0ef5ba50e3c3daa927 (patch) | |
| tree | 03de331a8db6386dfd6fa75155bfbcea6b4feaf3 /public/debian-based-riced-up-distribution-for-developers-and-devops-folks.html | |
| parent | 84ed124529ffeee1590295b8de3a8faf51848680 (diff) | |
| download | mitjafelicijan.com-cd6644ea4ddc78597934ab0ef5ba50e3c3daa927.tar.gz | |
Moved to a simpler SSG
Diffstat (limited to 'public/debian-based-riced-up-distribution-for-developers-and-devops-folks.html')
| -rwxr-xr-x | public/debian-based-riced-up-distribution-for-developers-and-devops-folks.html | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/public/debian-based-riced-up-distribution-for-developers-and-devops-folks.html b/public/debian-based-riced-up-distribution-for-developers-and-devops-folks.html new file mode 100755 index 0000000..188eeb2 --- /dev/null +++ b/public/debian-based-riced-up-distribution-for-developers-and-devops-folks.html | |||
| @@ -0,0 +1,125 @@ | |||
| 1 | <!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAA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AAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Debian based riced up distribution for Developers and DevOps folks</title><meta name=description content="IntroductionI have been using Ubuntu for quite a longtime now."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:1rem;max-width:760px;background:#fff;font-family:times new roman,Times,serif;line-height:1.35rem}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}footer{margin-block-start:3rem}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;margin-block-start:1.5rem;margin-block-end:1.5rem;padding:.5rem 0;border-top:1px solid #000;border-bottom:1px solid #000}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace;font-size:initial!important}img,video,audio{max-width:100%}header{display:flex;flex-direction:row;gap:3rem}nav{display:flex;gap:.75rem}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main><a href=/>Home</a> | ||
| 2 | <a href=https://git.mitjafelicijan.com/ target=_blank>Git</a> | ||
| 3 | <a href=https://files.mitjafelicijan.com/ target=_blank>Files</a> | ||
| 4 | <a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a> | ||
| 5 | <a href=/curriculum-vitae.html>CV</a> | ||
| 6 | <a href=/index.xml target=_blank>RSS</a></nav></header><main><div><h1>Debian based riced up distribution for Developers and DevOps folks</h1><p>Dec 3, 2021<div><h2 id=introduction>Introduction</h2><p>I have been using <a href=https://ubuntu.com/>Ubuntu</a> for quite a longtime now. I have | ||
| 7 | used <a href=https://www.debian.org/>Debian</a> in the past and | ||
| 8 | <a href=https://manjaro.org/>Manjaro</a>. Also had <a href=https://archlinux.org/>Arch</a> for | ||
| 9 | some time and even ran <a href=https://www.gentoo.org/>Gentoo</a> way back.<p>What I learned from all this is that I prefer running a bit older versions and | ||
| 10 | having them be stable than run bleeding edge rolling release. For that reason, I | ||
| 11 | stuck with Ubuntu for a couple of years now. I am also at a point in my life | ||
| 12 | where I just don't care what is cool or hip anymore. I just want a stable system | ||
| 13 | that doesn't get in my way.<p>During all this, I noticed that these distributions were getting very bloated | ||
| 14 | and a lot of software got included that I usually uninstall on fresh | ||
| 15 | installation. Maybe this is my OCD speaking, but why do I have to give fresh | ||
| 16 | installation min 1 GB of ram out of the box just to have a blank screen in front | ||
| 17 | of me? I get it, there are many things included in the distro to make my life | ||
| 18 | easier. I understand. But at this point I have a feeling that modern Linux | ||
| 19 | distributions are becoming similar to <a href=https://devhumor.com/content/uploads/images/August2017/node-modules.jpg>Node.js project with | ||
| 20 | node_modules</a>. | ||
| 21 | Just a crazy number of packages serving very little or no purpose, just | ||
| 22 | supporting other software.<p>I felt I needed a fresh start. To start over with something minimal and clean. | ||
| 23 | Something that would put a little more joy into using a computer again.<p>For the first version, I wanted to target the following machines I have at home | ||
| 24 | that I want this thing to work on.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># My main stationary work machine</span> | ||
| 25 | </span></span><span style=display:flex><span>Resolution: 3840x1080 (Super Ultrawide Monitor 32:9) | ||
| 26 | </span></span><span style=display:flex><span>CPU: Intel i7-8700 (12) @ 4.600GHz | ||
| 27 | </span></span><span style=display:flex><span>GPU: AMD ATI Radeon RX 470/480/570/570X/580/580X/590 | ||
| 28 | </span></span><span style=display:flex><span>Memory: 32020MiB | ||
| 29 | </span></span></code></pre><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># Thinkpad x220 for testing things and goofing around</span> | ||
| 30 | </span></span><span style=display:flex><span>Resolution: 1366x768 | ||
| 31 | </span></span><span style=display:flex><span>CPU: Intel i5-2520M (4) @ 3.200GHz | ||
| 32 | </span></span><span style=display:flex><span>GPU: Intel 2nd Generation Core Processor Family | ||
| 33 | </span></span><span style=display:flex><span>Memory: 15891MiB | ||
| 34 | </span></span></code></pre><h2 id=how-should-i-approach-this>How should I approach this?</h2><p>I knew I wanted to use <a href=https://www.debian.org/CD/netinst/>minimal Debian netinst</a> for the base to give myself a head | ||
| 35 | start. No reason to go through changing the installer and also testing all that | ||
| 36 | behemoth of a thing. So, some sort of ricing was the only logical option to get | ||
| 37 | this thing of the grounds somewhat quickly.<blockquote><p><strong>What is ricing anyway?</strong> | ||
| 38 | The term “RICE” stands for Race Inspired Cosmetic Enhancement. A group of | ||
| 39 | people (could be one, idk) decided to see if they could tweak their own | ||
| 40 | distros like they/others did their cars. This gave rise to a community of | ||
| 41 | Linux/Unix enthusiasts trying to make their distros look cooler and better | ||
| 42 | than others... For more information, read this article | ||
| 43 | <a href=https://pesos.github.io/2020/07/14/what-is-ricing.html>What in the world is ricing!?</a>.</blockquote><p>I didn't want this to just be a set of config files for theming purpose. I | ||
| 44 | wanted this to include a set of pre-installed tools and services that are being | ||
| 45 | used all the time by a modern developer. Theming is just a tiny part of it. | ||
| 46 | Fonts being applied across the distro and things like that.<p>First, I choose terminal installer and left it to load additional components. | ||
| 47 | Avoid using graphical installer in this case.<p><img src=/assets/dfd-rice/install-00.png alt><p>After that I selected hostname and created a normal user and set password for | ||
| 48 | that user and root user and choose guided mode for disk partitioning.<p><img src=/assets/dfd-rice/install-01.png alt><p>I left it run to install all the things required for the base system and opted | ||
| 49 | out of scanning additional media for use by the package manager. Those will be | ||
| 50 | downloaded from the internet during installation.<p><img src=/assets/dfd-rice/install-02.png alt><p>I opted out of the popularity contest, and <strong>now comes the important part</strong>. | ||
| 51 | Uncheck all the boxes in Software selection and only leave 'standard system | ||
| 52 | utilities'. I also left an SSH server, so I was able to log in to the machine | ||
| 53 | from my main PC.<p><img src=/assets/dfd-rice/install-03.png alt><p>At this point, I installed GRUB bootloader on the disk where I installed the | ||
| 54 | system.<p><img src=/assets/dfd-rice/install-04.png alt><p>That concluded the installation of base Debian and after restarting the computer | ||
| 55 | I was prompted with the login screen.<p><img src=/assets/dfd-rice/install-05.png alt><p>Now that I had the base installation, it was time to choose what software do I | ||
| 56 | want to include in this so-called distribution. I wanted out of the box | ||
| 57 | developer experience, so I had plenty to choose.<p>Let's not waste time and go through the list.<h2 id=desktop-environments>Desktop environments</h2><p>I have been using <a href=https://www.gnome.org/>Gnome</a> for my whole Linux life. From | ||
| 58 | version 2 forward. It's been quite a ride. I hated version 3 when it came out | ||
| 59 | and replaced version 2. But I got used to it. And now with version 40+ they also | ||
| 60 | made couple of changes which I found both frustrating and presently surprised.<p>The amount of vertical space you loose because of the beefy title bars on | ||
| 61 | windows is ridiculous. And then in case of | ||
| 62 | <a href=https://gnunn1.github.io/tilix-web/>Tilix</a> you also have tabs, and you are | ||
| 63 | 100px deep. Vertical space is one of the most important things for a | ||
| 64 | developer. The more real estate you have, the more code you can have in a | ||
| 65 | viewport.<p>But on the other hand, I still love how Gnome feels and looks. I gotta give them | ||
| 66 | that. They really are trying to make Gnome feel unified and modern.<p>Regardless of all the nice things Gnome has, I was looking at the tiling window | ||
| 67 | managers for some time, but never had the nerve to actually go with it. But now | ||
| 68 | was the ideal time to give it a go. No guts, no glory kind of a thing.<p>One of the requirements for me was easy custom layouts because I use a really | ||
| 69 | strange monitor with aspect ratio of 32:9. So relying on included layouts most | ||
| 70 | of them have is a non-starter.<p>What I was doing in Gnome was having windows in a layout like the diagram | ||
| 71 | below. This is my common practice. And if you look at it you can clearly see I | ||
| 72 | was replicating tiling window manager setup in Gnome.<p><img src=/assets/dfd-rice/layout.png alt><p>That made me look into a bunch of tiling window managers and then tested them | ||
| 73 | out. Candidates I was looking at were:<ul><li><a href=https://i3wm.org/>i3</a><li><a href=https://github.com/baskerville/bspwm>bspwm</a><li><a href=https://awesomewm.org/index.html>awesome</a><li><a href=https://xmonad.org/>XMonad</a><li><a href=https://swaywm.org/>sway</a><li><a href=http://www.qtile.org/>Qtile</a><li><a href=https://dwm.suckless.org/>dwm</a></ul><p>You can also check article <a href=https://www.tecmint.com/best-tiling-window-managers-for-linux/>13 Best Tiling Window Managers for | ||
| 74 | Linux</a> I was | ||
| 75 | referencing while testing them out.<p>While all of them provided what I needed, I liked i3 the most. What particular | ||
| 76 | caught my eye was the ease to use and tree based layouts which allows flexible | ||
| 77 | layouts. I know others can be set up also to have custom layouts other than<br>spiral, dwindle etc. I think i3 is a good entry-level window manager for | ||
| 78 | somebody like me.<h2 id=batteries-included>Batteries included</h2><p>The source for the whole thing is located on Github | ||
| 79 | <a href=https://github.com/mitjafelicijan/dfd-rice>https://github.com/mitjafelicijan/dfd-rice</a>.<p>Currenly included:<ul><li><code>non-free</code> (enables non-free packages in apt)<li><code>sudo</code> (adds sudo and adds user to sudo group)<li><code>essentials</code> (gcc, htop, zip, curl, etc...)<li><code>wifi</code> (network manager nmtui)<li><code>desktop</code> (i3, dmenu, fonts, configurations)<li><code>pulseaudio</code> (pulseaudio with pavucontrol)<li><code>code-editors</code> (vim, micro, vscode)<li><code>ohmybash</code> (make bash pretty)<li><code>file-managers</code> (mc)<li><code>git-ui</code> (terminal git gui)<li><code>meld</code> (diff tool)<li><code>profiling</code> (kcachegrind, valgrind, strace, ltrace)<li><code>browsers</code> (brave, firefox, chromium)<li>programming languages:<ul><li><code>python</code><li><code>golang</code><li><code>nodejs</code><li><code>rust</code><li><code>nim</code><li><code>php</code><li><code>ruby</code></ul><li><code>docker</code> (with docker-compose)<li><code>ansible</code></ul><p>Install script also allows you to install only specific packages (example for: | ||
| 80 | essentials ohmybash docker rust).<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>su - root <span style=color:#a31515>\ | ||
| 81 | </span></span></span><span style=display:flex><span><span style=color:#a31515></span> bash -c <span style=color:#a31515>"</span><span style=color:#00f>$(</span>wget -q https://raw.github.com/mitjafelicijan/dfd-rice/master/tools/install.sh -O -<span style=color:#00f>)</span><span style=color:#a31515>"</span> -- <span style=color:#a31515>\ | ||
| 82 | </span></span></span><span style=display:flex><span><span style=color:#a31515></span> essentials ohmybash docker rust | ||
| 83 | </span></span></code></pre><p>Currently, most of these recipes use what Debian and this is totally fine with | ||
| 84 | me since I never use bleeding edge features of a package. But if something major | ||
| 85 | would come to light, I will replace it with a possible compilation script or | ||
| 86 | something similar.<p>This is some of the output from the installation script.<p><img src=/assets/dfd-rice/script.png alt><p>Let's take a look at some examples in the installation script.<h3 id=docker-recipe>Docker recipe</h3><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># docker</span> | ||
| 87 | </span></span><span style=display:flex><span>print_header <span style=color:#a31515>"Installing Docker"</span> | ||
| 88 | </span></span><span style=display:flex><span>curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --yes --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | ||
| 89 | </span></span><span style=display:flex><span>echo <span style=color:#a31515>"deb [arch=</span><span style=color:#00f>$(</span>dpkg --print-architecture<span style=color:#00f>)</span><span style=color:#a31515> signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian </span><span style=color:#00f>$(</span>lsb_release -cs<span style=color:#00f>)</span><span style=color:#a31515> stable"</span> | tee /etc/apt/sources.list.d/docker.list > /dev/null | ||
| 90 | </span></span><span style=display:flex><span>apt update | ||
| 91 | </span></span><span style=display:flex><span>apt -y install docker-ce docker-ce-cli containerd.io docker-compose | ||
| 92 | </span></span><span style=display:flex><span> | ||
| 93 | </span></span><span style=display:flex><span>systemctl start docker | ||
| 94 | </span></span><span style=display:flex><span>systemctl enable docker | ||
| 95 | </span></span><span style=display:flex><span>systemctl status docker --no-pager | ||
| 96 | </span></span><span style=display:flex><span> | ||
| 97 | </span></span><span style=display:flex><span>/sbin/usermod -aG docker $USERNAME | ||
| 98 | </span></span></code></pre><h3 id=making-bash-pretty>Making bash pretty</h3><p>I really like <a href=https://ohmyz.sh/>Oh My Zsh</a>, but I don't like zsh shell. When | ||
| 99 | I used it, I constantly needed to be aware of it and running bash scripts was a | ||
| 100 | pain. So, I was really delighted when I found out that a version for bash | ||
| 101 | existed called <a href=https://ohmybash.nntoan.com/>Oh My Bash</a>. Let's take a look at | ||
| 102 | the recipe for installing it.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span><span style=color:green># ohmybash</span> | ||
| 103 | </span></span><span style=display:flex><span>print_header <span style=color:#a31515>"Enabling OhMyBash"</span> | ||
| 104 | </span></span><span style=display:flex><span>sudo -u $USERNAME sh -c <span style=color:#a31515>"</span><span style=color:#00f>$(</span>curl -fsSL https://raw.github.com/ohmybash/oh-my-bash/master/tools/install.sh<span style=color:#00f>)</span><span style=color:#a31515>"</span> & | ||
| 105 | </span></span><span style=display:flex><span>T1=<span style=color:#a31515>${</span>!<span style=color:#a31515>}</span> | ||
| 106 | </span></span><span style=display:flex><span>wait <span style=color:#a31515>${</span>T1<span style=color:#a31515>}</span> | ||
| 107 | </span></span></code></pre><p>Because OhMyBash does <code>exec bash</code> at the end, this traps our script inside | ||
| 108 | another shell and our script cannot continue. For that reason, I executed this | ||
| 109 | in background. But that presents a new problem. Because this is executed in | ||
| 110 | background, we lose track of progress naturally. And that strange trick with | ||
| 111 | <code>T1=${!}</code> and <code>wait ${T1}</code> waits for the background process to finish before | ||
| 112 | continuing to another task in bash script.<p>Check <a href=https://www.cloudsavvyit.com/12277/how-to-use-multi-threaded-processing-in-bash-scripts/>Multi-Threaded Processing in Bash Scripts</a> | ||
| 113 | for more details.<h2 id=conclusion>Conclusion</h2><p>Take a look at | ||
| 114 | <a href=https://github.com/mitjafelicijan/dfd-rice/blob/develop/tools/install.sh>https://github.com/mitjafelicijan/dfd-rice/blob/develop/tools/install.sh</a> script | ||
| 115 | to get familiar with it. This is just a first iteration and I will continue to | ||
| 116 | update it because I need this in my life.<p>The current version boots in 4s to the login prompt, and after you log in, the | ||
| 117 | desktop environment loads in 2s. So, its fast, very fast. And on clean boot, I | ||
| 118 | measured ~230 MB of RAM usage.<p>And this is how it looks with two terminals side by side. I really like the | ||
| 119 | simplicity and clean interface. I will polish the colors and stuff like that, | ||
| 120 | but I really do like the results.<p><img src=/assets/dfd-rice/desktop.png alt></div></div></main><footer><hr><div><h3>Want to comment or have something to add?</h3>You can write me an email at | ||
| 121 | <a href=mailto:m@mitjafelicijan.com>m@mitjafelicijan.com</a> or catch up | ||
| 122 | with me | ||
| 123 | <a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.</div><hr><p>This website does not track you. Content is made available under | ||
| 124 | the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified | ||
| 125 | otherwise. Blog feed is available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script src=https://cdn.usefathom.com/script.js data-site=XHQARKXP defer></script> \ No newline at end of file | ||
