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