aboutsummaryrefslogtreecommitdiff
path: root/content/posts/2021-12-03-debian-based-riced-up-distribution-for-developers.md
diff options
context:
space:
mode:
Diffstat (limited to 'content/posts/2021-12-03-debian-based-riced-up-distribution-for-developers.md')
-rw-r--r--content/posts/2021-12-03-debian-based-riced-up-distribution-for-developers.md164
1 files changed, 121 insertions, 43 deletions
diff --git a/content/posts/2021-12-03-debian-based-riced-up-distribution-for-developers.md b/content/posts/2021-12-03-debian-based-riced-up-distribution-for-developers.md
index 56816a0..b8d93a6 100644
--- a/content/posts/2021-12-03-debian-based-riced-up-distribution-for-developers.md
+++ b/content/posts/2021-12-03-debian-based-riced-up-distribution-for-developers.md
@@ -1,21 +1,38 @@
1--- 1---
2title: Debian based riced up distribution for Developers and DevOps folks 2title: Debian based riced up distribution for Developers and DevOps folks
3url: debian-based-riced-up-distribution-for-developers-and-devops-folks.html 3url: debian-based-riced-up-distribution-for-developers-and-devops-folks.html
4date: 2021-12-03 4date: 2021-12-03T12:00:00+02:00
5draft: false 5draft: false
6--- 6---
7 7
8## Introduction 8## Introduction
9 9
10I have been using [Ubuntu](https://ubuntu.com/) for quite a longtime now. I have used [Debian](https://www.debian.org/) in the past and [Manjaro](https://manjaro.org/). Also had [Arch](https://archlinux.org/) for some time and even ran [Gentoo](https://www.gentoo.org/) way back. 10I have been using [Ubuntu](https://ubuntu.com/) for quite a longtime now. I
11 11have used [Debian](https://www.debian.org/) in the past and [Manjaro](https://manjaro.org/).
12What I learned from all this is that I prefer running a bit older versions and having them be stable than run bleeding edge rolling release. For that reason, I stuck with Ubuntu for a couple of years now. I am also at a point in my life where I just don't care what is cool or hip anymore. I just want a stable system that doesn't get in my way. 12Also had [Arch](https://archlinux.org/) for some time and even ran
13 13[Gentoo](https://www.gentoo.org/) way back.
14During all this, I noticed that these distributions were getting very bloated and a lot of software got included that I usually uninstall on fresh installation. Maybe this is my OCD speaking, but why do I have to give fresh installation min 1 GB of ram out of the box just to have a blank screen in front of me? I get it, there are many things included in the distro to make my life easier. I understand. But at this point I have a feeling that modern Linux distributions are becoming similar to [Node.js project with node_modules](https://devhumor.com/content/uploads/images/August2017/node-modules.jpg). Just a crazy number of packages serving very little or no purpose, just supporting other software. 14
15 15What I learned from all this is that I prefer running a bit older versions and
16I felt I needed a fresh start. To start over with something minimal and clean. Something that would put a little more joy into using a computer again. 16having them be stable than run bleeding edge rolling release. For that reason,
17 17I stuck with Ubuntu for a couple of years now. I am also at a point in my life
18For the first version, I wanted to target the following machines I have at home that I want this thing to work on. 18where I just don't care what is cool or hip anymore. I just want a stable
19system that doesn't get in my way.
20
21During all this, I noticed that these distributions were getting very bloated
22and a lot of software got included that I usually uninstall on fresh
23installation. Maybe this is my OCD speaking, but why do I have to give fresh
24installation min 1 GB of ram out of the box just to have a blank screen in
25front of me? I get it, there are many things included in the distro to make my
26life easier. I understand. But at this point I have a feeling that modern Linux
27distributions are becoming similar to [Node.js project with node_modules](https://devhumor.com/content/uploads/images/August2017/node-modules.jpg).
28Just a crazy number of packages serving very little or no purpose, just
29supporting other software.
30
31I felt I needed a fresh start. To start over with something minimal and clean.
32Something that would put a little more joy into using a computer again.
33
34For the first version, I wanted to target the following machines I have at
35home that I want this thing to work on.
19 36
20```yaml 37```yaml
21# My main stationary work machine 38# My main stationary work machine
@@ -35,61 +52,99 @@ Memory: 15891MiB
35 52
36## How should I approach this? 53## How should I approach this?
37 54
38I knew I wanted to use [minimal Debian netinst ](https://www.debian.org/CD/netinst/) for the base to give myself a head start. No reason to go through changing the installer and also testing all that behemoth of a thing. So, some sort of ricing was the only logical option to get this thing of the grounds somewhat quickly. 55I knew I wanted to use [minimal Debian netinst ](https://www.debian.org/CD/netinst/)
39 56for the base to give myself a head start. No reason to go through changing the
57installer and also testing all that behemoth of a thing. So, some sort of
58ricing was the only logical option to get this thing of the grounds somewhat
59quickly.
40 60
41> **What is ricing anyway?** 61> **What is ricing anyway?**
42> The term “RICE” stands for Race Inspired Cosmetic Enhancement. A group of people (could be one, idk) decided to see if they could tweak their own distros like they/others did their cars. This gave rise to a community of Linux/Unix enthusiasts trying to make their distros look cooler and better than others... For more information, read this article [What in the world is ricing!?](https://pesos.github.io/2020/07/14/what-is-ricing.html). 62> The term “RICE” stands for Race Inspired Cosmetic Enhancement. A group of
63> people (could be one, idk) decided to see if they could tweak their own
64> distros like they/others did their cars. This gave rise to a community of
65> Linux/Unix enthusiasts trying to make their distros look cooler and better
66> than others... For more information, read this article
67> [What in the world is ricing!?](https://pesos.github.io/2020/07/14/what-is-ricing.html).
43 68
44I didn't want this to just be a set of config files for theming purpose. I wanted this to include a set of pre-installed tools and services that are being used all the time by a modern developer. Theming is just a tiny part of it. Fonts being applied across the distro and things like that. 69I didn't want this to just be a set of config files for theming purpose. I
70wanted this to include a set of pre-installed tools and services that are being
71used all the time by a modern developer. Theming is just a tiny part of it.
72Fonts being applied across the distro and things like that.
45 73
46First, I choose terminal installer and left it to load additional components. Avoid using graphical installer in this case. 74First, I choose terminal installer and left it to load additional components.
75Avoid using graphical installer in this case.
47 76
48![](/assets/dfd-rice/install-00.png) 77![](/assets/dfd-rice/install-00.png)
49 78
50After that I selected hostname and created a normal user and set password for that user and root user and choose guided mode for disk partitioning. 79After that I selected hostname and created a normal user and set password for
80that user and root user and choose guided mode for disk partitioning.
51 81
52![](/assets/dfd-rice/install-01.png) 82![](/assets/dfd-rice/install-01.png)
53 83
54I left it run to install all the things required for the base system and opted out of scanning additional media for use by the package manager. Those will be downloaded from the internet during installation. 84I left it run to install all the things required for the base system and opted
85out of scanning additional media for use by the package manager. Those will be
86downloaded from the internet during installation.
55 87
56![](/assets/dfd-rice/install-02.png) 88![](/assets/dfd-rice/install-02.png)
57 89
58 90
59I opted out of the popularity contest, and **now comes the important part**. Uncheck all the boxes in Software selection and only leave 'standard system utilities'. I also left an SSH server, so I was able to log in to the machine from my main PC. 91I opted out of the popularity contest, and **now comes the important part**.
92Uncheck all the boxes in Software selection and only leave 'standard system
93utilities'. I also left an SSH server, so I was able to log in to the machine
94from my main PC.
60 95
61![](/assets/dfd-rice/install-03.png) 96![](/assets/dfd-rice/install-03.png)
62 97
63At this point, I installed GRUB bootloader on the disk where I installed the system. 98At this point, I installed GRUB bootloader on the disk where I installed the
99system.
64 100
65![](/assets/dfd-rice/install-04.png) 101![](/assets/dfd-rice/install-04.png)
66 102
67That concluded the installation of base Debian and after restarting the computer I was prompted with the login screen. 103That concluded the installation of base Debian and after restarting the
104computer I was prompted with the login screen.
68 105
69![](/assets/dfd-rice/install-05.png) 106![](/assets/dfd-rice/install-05.png)
70 107
71Now that I had the base installation, it was time to choose what software do I want to include in this so-called distribution. I wanted out of the box developer experience, so I had plenty to choose. 108Now that I had the base installation, it was time to choose what software do I
109want to include in this so-called distribution. I wanted out of the box
110developer experience, so I had plenty to choose.
72 111
73Let's not waste time and go through the list. 112Let's not waste time and go through the list.
74 113
75## Desktop environments 114## Desktop environments
76 115
77I have been using [Gnome](https://www.gnome.org/) for my whole Linux life. From version 2 forward. It's been quite a ride. I hated version 3 when it came out and replaced version 2. But I got used to it. And now with version 40+ they also made couple of changes which I found both frustrating and presently surprised. 116I have been using [Gnome](https://www.gnome.org/) for my whole Linux life.
117From version 2 forward. It's been quite a ride. I hated version 3 when it
118came out and replaced version 2. But I got used to it. And now with version
11940+ they also made couple of changes which I found both frustrating and
120presently surprised.
78 121
79The amount of vertical space you loose because of the beefy title bars on windows is ridiculous. And then in case of [Tilix](https://gnunn1.github.io/tilix-web/) you also have tabs, and you are 100px deep. Vertical space is one of the most important things for a developer. The more real estate you have, the more code you can have in a viewport. 122The amount of vertical space you loose because of the beefy title bars on
123windows is ridiculous. And then in case of [Tilix](https://gnunn1.github.io/tilix-web/)
124you also have tabs, and you are 100px deep. Vertical space is one of the most
125important things for a developer. The more real estate you have, the more
126code you can have in a viewport.
80 127
81But on the other hand, I still love how Gnome feels and looks. I gotta give them that. They really are trying to make Gnome feel unified and modern. 128But on the other hand, I still love how Gnome feels and looks. I gotta give
129them that. They really are trying to make Gnome feel unified and modern.
82 130
83Regardless of all the nice things Gnome has, I was looking at the tiling window managers for some time, but never had the nerve to actually go with it. But now was the ideal time to give it a go. No guts, no glory kind of a thing. 131Regardless of all the nice things Gnome has, I was looking at the tiling
132window managers for some time, but never had the nerve to actually go with
133it. But now was the ideal time to give it a go. No guts, no glory kind of
134a thing.
84 135
85One of the requirements for me was easy custom layouts because I use a really strange monitor with aspect ratio of 32:9. So relying on included layouts most of them have is a non-starter. 136One of the requirements for me was easy custom layouts because I use a really
137strange monitor with aspect ratio of 32:9. So relying on included layouts
138most of them have is a non-starter.
86 139
87What I was doing in Gnome was having windows in a layout like the diagram below. This is my common practice. And if you look at it you can clearly see I was replicating tiling window manager setup in Gnome. 140What I was doing in Gnome was having windows in a layout like the diagram
141below. This is my common practice. And if you look at it you can clearly see
142I was replicating tiling window manager setup in Gnome.
88 143
89![](/assets/dfd-rice/layout.png) 144![](/assets/dfd-rice/layout.png)
90 145
91 146That made me look into a bunch of tiling window managers and then tested them
92That made me look into a bunch of tiling window managers and then tested them out. Candidates I was looking at were: 147out. Candidates I was looking at were:
93 148
94- [i3](https://i3wm.org/) 149- [i3](https://i3wm.org/)
95- [bspwm](https://github.com/baskerville/bspwm) 150- [bspwm](https://github.com/baskerville/bspwm)
@@ -99,16 +154,21 @@ That made me look into a bunch of tiling window managers and then tested them ou
99- [Qtile](http://www.qtile.org/) 154- [Qtile](http://www.qtile.org/)
100- [dwm](https://dwm.suckless.org/) 155- [dwm](https://dwm.suckless.org/)
101 156
102You can also check article [13 Best Tiling Window Managers for Linux](https://www.tecmint.com/best-tiling-window-managers-for-linux/) I was referencing while testing them out. 157You can also check article [13 Best Tiling Window Managers for Linux](https://www.tecmint.com/best-tiling-window-managers-for-linux/)
103 158I was referencing while testing them out.
104While all of them provided what I needed, I liked i3 the most. What particular caught my eye was the ease to use and tree based layouts which allows flexible layouts. I know others can be set up also to have custom layouts other than spiral, dwindle etc. I think i3 is a good entry-level window manager for somebody like me.
105 159
160While all of them provided what I needed, I liked i3 the most. What particular
161caught my eye was the ease to use and tree based layouts which allows flexible
162layouts. I know others can be set up also to have custom layouts other than
163spiral, dwindle etc. I think i3 is a good entry-level window manager for
164somebody like me.
106 165
107## Batteries included 166## Batteries included
108 167
109The source for the whole thing is located on Github https://github.com/mitjafelicijan/dfd-rice. 168The source for the whole thing is located on Github https://github.com/mitjafelicijan/dfd-rice.
110 169
111Currenly included: 170Currenly included:
171
112- `non-free` (enables non-free packages in apt) 172- `non-free` (enables non-free packages in apt)
113- `sudo` (adds sudo and adds user to sudo group) 173- `sudo` (adds sudo and adds user to sudo group)
114- `essentials` (gcc, htop, zip, curl, etc...) 174- `essentials` (gcc, htop, zip, curl, etc...)
@@ -133,16 +193,19 @@ Currenly included:
133- `docker` (with docker-compose) 193- `docker` (with docker-compose)
134- `ansible` 194- `ansible`
135 195
136Install script also allows you to install only specific packages (example for: essentials ohmybash docker rust). 196Install script also allows you to install only specific packages (example for:
197essentials ohmybash docker rust).
137 198
138```sh 199```sh
139su - root \ 200su - root \
140 bash -c "$(wget -q https://raw.github.com/mitjafelicijan/dfd-rice/master/tools/install.sh -O -)" -- \ 201 bash -c "$(wget -q https://raw.github.com/mitjafelicijan/dfd-rice/master/tools/install.sh -O -)" -- \
141 essentials ohmybash docker rust 202 essentials ohmybash docker rust
142
143``` 203```
144 204
145Currently, most of these recipes use what Debian and this is totally fine with me since I never use bleeding edge features of a package. But if something major would come to light, I will replace it with a possible compilation script or something similar. 205Currently, most of these recipes use what Debian and this is totally fine with
206me since I never use bleeding edge features of a package. But if something
207major would come to light, I will replace it with a possible compilation
208script or something similar.
146 209
147This is some of the output from the installation script. 210This is some of the output from the installation script.
148 211
@@ -150,7 +213,6 @@ This is some of the output from the installation script.
150 213
151Let's take a look at some examples in the installation script. 214Let's take a look at some examples in the installation script.
152 215
153
154### Docker recipe 216### Docker recipe
155 217
156```sh 218```sh
@@ -170,7 +232,11 @@ systemctl status docker --no-pager
170 232
171### Making bash pretty 233### Making bash pretty
172 234
173I really like [Oh My Zsh](https://ohmyz.sh/), but I don't like zsh shell. When I used it, I constantly needed to be aware of it and running bash scripts was a pain. So, I was really delighted when I found out that a version for bash existed called [Oh My Bash](https://ohmybash.nntoan.com/). Let's take a look at the recipe for installing it. 235I really like [Oh My Zsh](https://ohmyz.sh/), but I don't like zsh shell.
236When I used it, I constantly needed to be aware of it and running bash scripts
237was a pain. So, I was really delighted when I found out that a version for
238bash existed called [Oh My Bash](https://ohmybash.nntoan.com/). Let's take a
239look at the recipe for installing it.
174 240
175```sh 241```sh
176# ohmybash 242# ohmybash
@@ -180,17 +246,29 @@ T1=${!}
180wait ${T1} 246wait ${T1}
181``` 247```
182 248
183Because OhMyBash does `exec bash` at the end, this traps our script inside another shell and our script cannot continue. For that reason, I executed this in background. But that presents a new problem. Because this is executed in background, we lose track of progress naturally. And that strange trick with `T1=${!}` and `wait ${T1}` waits for the background process to finish before continuing to another task in bash script. 249Because OhMyBash does `exec bash` at the end, this traps our script inside
184 250another shell and our script cannot continue. For that reason, I executed
185Check [Multi-Threaded Processing in Bash Scripts](https://www.cloudsavvyit.com/12277/how-to-use-multi-threaded-processing-in-bash-scripts/) for more details. 251this in background. But that presents a new problem. Because this is executed
252in background, we lose track of progress naturally. And that strange trick
253with `T1=${!}` and `wait ${T1}` waits for the background process to finish
254before continuing to another task in bash script.
186 255
256Check [Multi-Threaded Processing in Bash Scripts](https://www.cloudsavvyit.com/12277/how-to-use-multi-threaded-processing-in-bash-scripts/)
257for more details.
187 258
188## Conclusion 259## Conclusion
189 260
190Take a look at https://github.com/mitjafelicijan/dfd-rice/blob/develop/tools/install.sh script to get familiar with it. This is just a first iteration and I will continue to update it because I need this in my life. 261Take a look at https://github.com/mitjafelicijan/dfd-rice/blob/develop/tools/install.sh
262script to get familiar with it. This is just a first iteration and I will
263continue to update it because I need this in my life.
191 264
192The current version boots in 4s to the login prompt, and after you log in, the desktop environment loads in 2s. So, its fast, very fast. And on clean boot, I measured ~230 MB of RAM usage. 265The current version boots in 4s to the login prompt, and after you log in,
266the desktop environment loads in 2s. So, its fast, very fast. And on clean
267boot, I measured ~230 MB of RAM usage.
193 268
194And this is how it looks with two terminals side by side. I really like the simplicity and clean interface. I will polish the colors and stuff like that, but I really do like the results. 269And this is how it looks with two terminals side by side. I really like the
270simplicity and clean interface. I will polish the colors and stuff like that,
271but I really do like the results.
195 272
196![](/assets/dfd-rice/desktop.png) 273![](/assets/dfd-rice/desktop.png)
274