Posts about: Nix

Outsourcing NixOS compile time to Microsoft

NixOS is a Linux-distribution that may be source-based, but it has a binary cache that covers things so you generally don’t need to compile things, things tends to be cached.

However, depending on how you configure your system, you may trigger compiles depending on what you do.

So a thing I do is that I run Emacs 29 with the native-comp patches that is wayland native with the pgtk-branch. This is by no mean the stable Emacs release at the point of writing. So to get this Emacs I use the excellent nix-community/emacs-overlay (that is maintained by my friend @adisbladis). However, this means that I will get Emacs from a development branch of Emacs, then I need to build all the Emacs packages that I use in my configuration as well for this version of Emacs.

Read On →

Dynamic CSS color themes with similar contrasts

This blog is built with Emacs, SCSS using Nix and deployed as static files to GitHub Pages. This blog also has quite some colors due to the syntax highlighting for code that is performed using CSS rules on HTML classes.

So in total I have 15 different colors defined, in which four of them is background and foreground colors, two of them is related to link and visited link colors. Then I have nine colors remaining which are related to syntax highlighting of code.

Read On →

Simple deployments of NixOS machines with nixus

Since I’ve started using NixOS about four years ago I haven’t really used any tools to do central deployments of machines. But I’ve always read and known that NixOS is excellent at this. NixOS can easily build another systems configuration, then copy the system to the target systems nix store and then activate it there.

Despite knowing all this, I haven’t gotten around to doing this centrally. A while ago the need for this changed because one of my VPSes started running low on RAM, low enough to not be able to build new generations of it’s own system. Which posed a problem for future upgrades. One way to solve it would be to pay more money for resources that aren’t really needed except from when doing system upgrades. The other way would be to push pre-built systems from another location. Using the second way is simpler and fixes the issue.

Read On →

Switching to Wayland (Sway)

Like every other desktop Linux user for the past many years I’ve used X11. I was on i3wm for quite some time until I was introduced to Emacs X11 Window Manager which I used exclusively for about 18 months, I’ve even held a talk about it. But at some point it got too annoying, for example in multi monitor use cases.

At this point my first step was to go back to set up i3wm again. With that set up I wanted to give SwayWM another attempt, it was years ago I’ve checked it out before. I think my previous experience was when the project was new. At that point (if I remember correctly), not even the window decorations looked like the ones in i3wm.

Read On →

PHP packaging in NixOS ❄

This is a sneak peak into the future 20.09 release of NixOS.

The PHP packaging ecosystem in NixOS has been in a quite sad state for a long time. Partly because of the lack of people caring about PHP in Nix, but also that PHP is a bit weird when it comes to packaging.

State of PHP before NixOS 20.09

Due to the lack of ability to do clever things like the python community does with =withPackages= to compose a package with the dependencies you need we have defaulted to provide a huge default package to accommodate all needs.

Read On →