$ blog
The is the rolling release Index.
A HomeLab Appeared!
[post]
Recently, I embarked on a journey to create my very own Homelab.
Despite the fancy term, it's essentially just a dedicated computer
running Linux and various services 24x7.
Before we dive into the technical details, let me share the
motivation behind creating my Homelab.
My father uses Tally, an accounting software that can only run on a
single machine at a time. When he travels, he uses a different machine,
making it impossible to use Tally on the go. To resolve this, he would
have had to purchase another Tally license for his travel machine. To
provide a cost-effective and efficient solution, I convinced him to
invest in a server. I configured the server to run a Windows VM,
allowing my father to RDP into it and use Tally from anywhere in the
world. This setup not only saves him the hassle of purchasing an
additional license but also ensures the security of his data, as
everything remains on the home server.
Now Let me walk you through the specs and components of my setup.
Specs
Let's start with the specifications of my Homelab. I opted for a Dell
PowerEdge T20.
CPU: Intel Xeon E3-1225 v3
The solid CPU, clocked at 3.60 GHz, came bundled with the system. It
provides ample power for all the tasks I run on the server.
GPU: Integrated Graphics
Currently using integrated graphics, I plan to upgrade to a dedicated
graphics card in the future for improved multimedia transcoding
capabilities.
RAM: 20GB
Equipped with 4 slots, the motherboard supports up to 32GB of RAM.
The system came with a 4GB stick, and I added two more 8GB sticks for a
total of 20GB. All RAM sticks are ECC Memory to ensure
stability, especially since the motherboard supports it.
Storage: 10.5TB
My storage setup involves a total of 10.5TB, with 5.5TB of usable
space. I utilize OpenZFS as the file
system, known for its robustness and battle-tested performance.
Disk Configuration
Here are the disks I'm using:
- WD Blue SA510 2.5 (500GB) (SSD) - OS drive
- ST4000VX000-1F4168 (4.00 TB)
- ST4000DM004-2U9104 (4.00 TB)
- ST1000DM003-1ER162 (1.00 TB)
- ST31000521AS (1.00 TB)
I use the 500GB SSD for the OS, and the 4TB drives are in a mirror,
along with the 1TB drives in another mirror. This effectively creates a
5TB pool, acting like a RAID-10
configuration. While I plan to add another pair of 4TB drives to expand
the pool, it currently meets my hobbyist needs.
Misc
To accommodate extra drives beyond the 4 SATA ports, I added a PCI-E
SATA Expansion card. The onboard Ethernet port provides internet
connectivity, and to address power cut-offs, the system is connected to
an external PSU.
Conclusion
In conclusion, my Homelab server, built on the Dell PowerEdge T20,
serves my current needs with room for future expansion. Feel free to
share your thoughts or ask any questions about my setup.
In the next blog I'll discuss about the Operating System(Linux Duh..)
I am using and why. Along with some guides on the setup.
Jan 07, 2024[edited]
I switched to NixOS
[post]
As a student obsessed with Linux, I had used a variety of Linux distributions over the years, from Ubuntu to Arch to some other different Linux distributions. However, I recently made the switch to NixOS, and I have to say, it was a game-changer for me. In this blog, I'll share my experience with NixOS and why I believed it was a great choice for any technology-savvy individual.
Why Did I switch?
So I was using Arch before NixOS and one might wonder what compelled me to make the switch. I switched to Arch Linux from Debian because I wanted faster updates for my some of the software I used and installing them manually was difficult. I also did not want to do big distribution upgrades from one major version to the next. Arch Linux is based on a rolling release schedule — packages are updated on a daily basis. What people often say is that Arch is “bleeding edge”. After a year or so of using Arch I usually ran into one problem which was one of the reasons that made me switch, That was how frequently the packages broke because some other package updated and it now broke some other packages. To solve this issue I had to always perform a whole system update which was fine if done every 2-3 days but if I skipped it for too long then I was in for a 1-3GB update easily. This quickly became frustrating and I wanted a way to have some bleeding edge applications that were independent and didn't break other software. After some research I found NixOS to be my best bet and it delivered perfectly!
Why NixOS?
One of the first things that stood out to me about NixOS is its approach to package management. Unlike other Linux distributions, NixOS uses the Nix package manager, which treats packages as immutable files rather than installing them directly into the system. This approach provides a number of benefits, including better reproducibility, easier rollback in case of issues, and more reliable upgrades. This was perfect for me as I could isolate packages to be bleeding edge and stable and as every package was indpendent of each other there was nothing to risk at all!
More than I asked for!
After learning about all that NixOS looked perfect for me but then I found out some other things about the distribution which changed the game drastically. The NixOS configuration file was a single file that could be used to fully specify the state of the system, making it easy to reproduce the same setup on different machines. This was a huge time-saver for me, as I could now quickly set up new development environments without having to manually install and configure software packages. This as a developer fascinated me as I could just setup my whole system in a single .nix
file instead of modifying 100s of different types of config files with different syntax.
Enter Home Manager - Home manager was like a god-sent to me as I could use it to setup all my dotfiles in the nix programming languages declaratively and it would setup everything for me. This was especially great for when I wanted to install my config on a new system as I could just install my home-manager config and boom! all my dotfiles perfectly working like I intended. Perfectly reproducible builds everytime. A example of a home manager config would be like this:
{ pkgs, theme, ... }: {
programs.foot = with theme.config; {
enable = true;
settings = {
main = {
font = "${font1}";
...
};
cursor.style = "beam";
key-bindings = {
clipboard-copy = "Mod1+c XF86Copy";
clipboard-paste = "Mod1+v XF86Paste";
};
colors = {
...
};
...
}
This block of code installs foot(A wayland terminal) and even sets it up for my personal liking.
Flakes
Nix Flakes is a new addition to the nix ecosystem, It's still a experimental feature as of now but is very powerful regardless. So, what are Nix Flakes? In short, Nix Flakes are a new way to define and manage packages in Nix. Unlike traditional Nix packages, which are defined in a single Nix expression, Nix Flakes can be composed of multiple expressions, making it easier to manage complex packages and builds. Additionally, Nix Flakes provide a number of new features, such as support for versioning, inheritance, and pinning, that make it easier to manage packages and builds over time. So how was this helpful for me you might ask? By using Nix Flakes I could setup individual dev-shells for different packages which faster than the traditional nix-shell. I could setup various different system configurations in a single flake file. Currently my whole NixOS configurations including all my packages, dotfiles, etc is one single nix flake. One of the features that I absolutely love is being able to fetch the latest git commit of a package. Previously I had to pin to a specific commit and had to manually change it If I wanted a newer version. Note: The pinning is still available Here is a example of how I use this feature.
# flake.nix
inputs = {
st-tanish2002 = {
url = "github:Tanish2002/st-tanish2002";
inputs.nixpkgs.follows = "nixpkgs";
};
}
# st.nix
{ inputs, pkgs, ... }: {
#Overlay for custom build of St, Installed in home.nix
nixpkgs.overlays = [
(final: prev: {
st-tanish2002 = inputs.st-tanish2002.defaultPackage.x86_64-linux;
})
];
home.packages = [ pkgs.st-tanish2002 ];
}
This config enables me to install my latest commit of st custom build.
Conclusion
I was really impressed with NixOS and I highly recommended it to anyone who wanted a reliable, customizable, and reproducible operating system. If you were looking for a change from the traditional Linux distributions, I suggested giving NixOS a try. I was confident you wouldn't be disappointed. It has a steep learning curve but after you get most things working, it's really great. Happy hacking!
You can find my config at: NixOS Config
Aug 08, 2022
Why Linux?
[post]
I've been using Linux for 2 years now. When I started it was difficult to find a truly optimal guide or some reasons as to why should I even bother using Linux when Windows "just works".
Well through this post I'm going to explain Why YOU should use Linux and How to get started with it. So without further ado, here is my guide to help boost you up in your Linux Journey
What is Linux?
I'll keep it short, Linux is NOT an Operating System, Linux itself is a Kernel. GNU/Linux(Usually Pronounced as Ganoo-slash-Linux) is the combination of GNU Software and the Linux Kernel both together forming an Operating System.
So If you are ever using a Linux Distro you are actually using GNU/Linux and not just Linux
Why Linux?
There are many reasons to learn Linux. Linux is a high-performance operating system way faster than most of the other Operating Systems
1. Always Full of surprises!
Linux is interesting to learn. It will not stop surprising you when it comes to learning something “new.” Did you Know?: You usually don't have to find "EXE" files to install packages, 90% of the software you want is already available in your distro's software repository.
2. It's FOSS! (Free and Open Source Software)
The Linux Kernel and the GNU Software are Free to use and OpenSource hence you don't have to pay a penny to use them. Unlike Windows or any other paid Operating System there is no license fee
3. Are you a programmer? Well, then this is your heaven.
Programmers Love Linux as they can modify their system on a whole another level and play around with things they were usually restricted from in their old OS.
Linux supports all the Major Languages and companies prefer to use Linux as their Primary OS when it comes to developing software
4. Automate Everything!
You can automate everything in Linux using simple 10 line shell scripts.
I have some handy shell scripts like a shell script to upload any string of text, a file, or an Image to an online file hosting service(0x0).
#!/bin/sh
[ -f "${1}" ] && op=cat
${op:-echo} "${1:-`cat -`}" \
| curl -s -F file='@-' 'http://0x0.st' \
| tee /dev/stderr \
| xclip -sel clip
I even have a small script that warns me whenever my battery level is low and making all these scripts wasn't hard you just need to know a bit of shell scripting and even you can make them
5. Customize Everything!
You aren't just limited to automation. You can even customize your system to work/look/feel however you want.
You might be thinking there must be some limit but no there is none! It is YOUR system you can do whatever you want. Also, before you start thinking you will have to pay for software to get that type of customization then no you are wrong!
You can achieve every bit of customization for absolutely free. You can browse some setups on r/unixporn and here are some of My setups: Here
How to Get Started?
I hope you all are convinced by now and want to get started. Here are some of my tips and to get started:
How to choose?
The distro doesn't matter:
Yes, Unless you have very special requirements like pentesting usually distros don't even matter. You can do everything you do on one distro on some other distro
The key difference is about the ease of use, No. of packages in repos, and Stability of packages.
Ease of Use:
If your priority is the ease of use then I would recommend starting with something like Ubuntu, Linux Mint, or Pop_OS.
All of these distros are known for their ease of use and Windows-like interface perfect for new users.
No of Packages:
If you are worried that you may not find the software you usually use in your distro's software repo then go for either Arch or Debian, both have a large repo
Ubuntu also has a Large repo but usually, if your software is not in the repos you'll have to manually install a PPA
Stability of Packages:
Usually, there are two types of distro a stable distro and a bleeding-edge distro. A stable distro's package repository usually contains applications with their most stable version and these packages are updated only after a lot of testing so the chances of encountering a bug in these applications are very less
A bleeding-edge distro's package repository usually contains the latest version of that application and hence are usually prone to bugs but you are instead getting the latest software and getting to test out features first. So if you want a Stable distro go for Ubuntu or Debian If you want a bleeding-edge distro then go for Arch or OpenSuse Tumbleweed.
Complete Freedom/Control:
If you want to take over complete control of your system right from the start then go for distros like Arch, Void or Gentoo, etc where you'll have to do everything yourself nothing is given to you by default but you get the absolute freedom of doing whatever you want and setting up your system however you want.
I would not recommend these distros to Complete beginners as they do require a basic knowledge of the Linux system beforehand.
How to Install?
Most beginners friendly distros like Ubuntu, Pop_OS, Linux Mint, etc have interactive installers which are very easy to understand and use.
All you need to do is grab the ISO of your preferred Distro burn that ISO either onto a Disc or use Rufus to make a bootable flash drive. Plug-in your drive and restart your system and keep pressing the key which takes you to your bios menu(usually Del
key).
From their on select to boot from your USB/Disc and then just follow along with the installer.
What to do after Install?
Whatever you want! Sky's the Limit.
- Fire the terminal and try out basic Linux commands
- Connect to the internet and update your system.
- Get a modern browser such as Chrome or Firefox.
- Try out different applications that came preinstalled such as text editors, games, and image viewers.
Some Unique Distros
- NixOS is a distro configured in a declarative and reproducible config, It is reliable and ensures that installing packages won't break the system
- Kali Linux is distro geared towards various information security tasks, such as Penetration Testing, Security Research, Computer Forensics, and Reverse Engineering.
- Clear Linux is a rolling release distro from Intel that initially targeted only cloud and container deployments.
- Puppy Linux is a minimal distro with all basic tools preinstalled and it is so small that it can be installed on a flash drive.
Conclusion
- Linux is fun to learn! It is also one of the most essential skills to have in the current market.
- If you learn Linux, you are bound to get a valuable skill under your belt. Even though if you never use it professionally, it can give you the ability to use an operating system that is free to use and open source.
- You can automate and customize it however you like and won't have to pay a single penny.
- Distros don't matter and it is completely possible to do the same thing on every distro.
- There is no best distro it all depends on your personal use case, here are my recommendations for different use cases:
Thanks for reading till the end 😊
Apr 16, 2021
Starting a Blog
[post]
So I decided to make a blog, why? you may ask well I don't really know myself, I just wanted to have something I can devote some of my free time to
I also wanted to just get in the habbit of typing regularly.
What will be the blog like?
Well I have not yet decided a specific type of blog, also it's just a personal blog so I'll honestly just add blogs about what's happening in life, What I am working on or just some random cool stuff I found online
I am even thinking of writing reviews of anime I watched but I have a another website which is related to anime so maybe I'll do that there...again not yet decided.
How did you make this blog
Well I considered a lot of option but from the start I wanted to generate the blog using Static site generators but stuff like hexa,jekyll and hugo are too big and have a lot of dependencies which would've been overkill for this small blog
So after some research I settled on a shell script site generator which would use markdown/org as templates, then I started working on making a one but as I'm very good with shell scripts it ended pretty badly but after some searching I found the exact same thing I was looking for- lb
lb was written in pure bash and was pretty easy to use but as I said earlier I wanteed to use markdown/org for templates, so I had to tinker a bit with the script and the css and then it worked perfectly
To generate sites all I have to do is ./lb m
and it asks for the article name and then opens my text editor with the draft file where I can easily write my blog in Markdown/ORG after saving the draft I can publish it using ./lb p
and it auto genrates the article with required css and header tags. For translating markdown/org to html and the other way around I use *Pandoc*
The File structure is pretty easy to understand as well
blog
├── 2021.html
├── blogindex.html
├── lb
├── posts
│ ├── .drafts
│ │ └── starting-a-blog.md
│ ├── .htaccess
│ └── this-is-a-test-blog.html
├── rss.xml
└── sup
Here 2021.html
is the article file where all the aritcles from 2021 are stored in a rolling release type format, blogindex.html
is also a auto generated file where all the blogs are stored in a list type format, in the posts
directory .drafts
is where all the drafts are stored which are staged to be published and all the other html files are the already published articles, all other things are self explanatory
Will this blog be updated often?
Short answer- NO, mostly becuase I'm busy with college and other stuff and this blog was mostly made becuase I wanted to make one :P, though I would try my best to update the blog often. Please don't hate me if I don't kthx.
Anyways I guess I'll end this blog here as this blog was made mostly for testing purpose. Thanks for reading 😊
by Tanish Khare [index|rolling]
subscribe
Feb 22, 2021[edited]