Zram is basically a compressed swap device located in your ram. You can check the usage by running zramctl.
I would recommend setting mem_limit to 10 GB or disk_size to 40GB and algorithm to lz4.
Zram is basically a compressed swap device located in your ram. You can check the usage by running zramctl.
I would recommend setting mem_limit to 10 GB or disk_size to 40GB and algorithm to lz4.
Zram usually has a very high compression ratio - around 4:1 for lz4 and 6:1 for zstd. You can set zram to 40-50 GB. It will still use less than 1/2 of your ram.
Zram has an option to write poorly compressible data to the disk instead of storing it in the ram. I would split the swap partition - 3 GB for zram writeback and rest for ordinary swap.
I was using flakes. I gave the reason why it’s data intensive. If a core dependency like glibc is updated, it’s hash will change and all packages that depend on it need to be rebuilt and rehashed. It’ll download all packages again even though there’s minimal change.
Interesting! Any reason for this choice instead of doing everything through nix?
That’s quite convincing :) I’ve been meaning to try gentoo for many years actually. I’ll install it soon and report back!
A laptop with 8 GB of ram and 6 cores. I have only one machine that I use for work. That’s the main issueI. Need to find a free weekend to compile and try out gentoo 😅
That’s right. I just rely on intuition to create a snapshot just before I think some operation will potentially break the system. (Along with daily snapshots)
It’s definitely not as bulletproof and transparent as Nixos. You can see what has changed by doing a diff :)
I definitely want to try out gentoo sometime. My system is not very powerful. I’m afraid it’ll compile for many days 😅
I was just going off based on its history. It began based on gentoo. (Wikipedia) but yea it is independent now.
Yeah. Most small changes will not rebuild everything. It’s just the core dependency updates that are most expensive. Like say openssl got a minor update. Now every package that depends on it needs to be rebuilt and rehashed because of the way nix store works.
Other than the obvious things like arch having better docs and lots of packages, void reminds me of arch before systemd. Especially editing rc.conf etc.
Was it recently? I remember doing the same some years ago 😆
I just wanted something lightweight and fast. It was between alpine (gentoo based), void and artix (arch based). I decided to go for void because it’s new and an independent distro. I’ll try the other two some day.
Thank you!
You can achieve similar results with ansible. But I like nix better. It is reproducible. You can think of it like docker.
Nix is also declarative and has rollback. Also, nixos-rebuild is idempotent.
Yeah. For reproducibility I still use nix. Especially when I have to share my dev environment with a team or to spin up identical servers.
Yeah there’s a lot of state accumulation especially in home folder which I clear manually from time to time.
In Nixos you can configure the impermanence module to clear unwanted state on your system and make it a “fresh install” on every reboot.
🎉 Same! I’ve been looking at Ashos (meta distribution) or just using btrfs snapshots to rollback when I break something.
You mean in terms of how fast it feels? I have never heard anyone saying this before. Can you share some details and perhaps some tips to improve performance on Nixos?
What hardware do you run Nixos on and do you modify and rebuild a lot of packages on nixpkgs?
Because modern web is bloatware. Too much javascript, CSS, ads and cookie popups. A phone’s hardware and internet speeds are generally not as fast as a desktop. So, it takes much longer to render on a phone.
Also, a lot websites nowadays deliberately make their mobile web experience shitty (cough ** reddit cough) to force their users to install their app.