Posts about: NixOS

Back from Hyprland to Sway

After a brief experiment with Hyprland, I’m back to using Sway. My experiment lasted less than a month, as I hoped Hyprland’s window selector would resolve my window-sharing woes.

It turns out it wasn’t, because the first week back at work I had the need to share a slideshow in full screen. Then it doesn’t matter if you can select a window anymore. So my workarounds with Sway would have worked in that use case while my Hyprland set up… didn’t.

Read On →

Switching from Sway to Hyprland

Introduction

After four years with Sway, I’ve decided to transition to Hyprland. My journey from EXWM to Sway began about four years ago, and I documented the experience in this post three years ago. While Sway has served me well, it has its limitations that I’ve used hacks and workarounds to circumvent.

The Limitations of Sway

One major drawback of Sway is its screen sharing capabilities. Although I managed to get screen sharing somewhat functional, it only allows sharing the full screen.

Read On →

NixOS superpower: specialisations

NixOS has a lot of configurability and features. One feature that I’ve known about for a while that I think is both really cool, but also a bit lesser known is the ability to have declarative Specialisations. To me, this is a superpower of NixOS that I have a hard time to see any other Linux Distribution having.

What’s a Specialisation?

The name doesn’t do it justice, it’s a bit of a weird name for it. However I couldn’t come up with a better name for it either.

Read On →

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 →

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 →

NixOS: Setting up Push To Talk in Mumble on Sway

Switching to Wayland has it’s side-effects, one of which is the improved security from X11 where applications can’t just randomly spy on each other at any point.

This is both good news and bad news.

The good news:

  • Applications can’t just randomly spy on each other.

The bad news:

  • Things like global hot-keys in for example Mumble won’t work.

Back from complaining to actually solving the problem though.

Mumble does have a patch for a future release

So there’s the issue about Push to talk does not work in Wayland, this has been followed up by a patch Add DBus calls to de/-activate push to talk. This patch will land in the 1.4.0 release though while current stable is 1.3.4.

Read On →

The day when ZFS saved my data

Today my work day didn’t turn out the way I expected. It started like a normal day, I woke up around the regular time, did my morning routine, sat at my desk and started my work-issued laptop.

It booted up just fine, I connected it to my Ultrawide display, started going through Slack and Email and catch up on some news while drinking my morning tea and waking up.

Then after around an hour of work things started to hang up, most notably Firefox totally froze up. I could launch a new terminal but not start htop, I had a htop session in a terminal already because it’s part of what I usually have running. So I went there to look.

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 →

NixOS ❄: tmpfs as home

This is a follow-up post for my earlier post: NixOS ❄: tmpfs as root.

When you start to go down the route of setting up a “pure” system that is as clean as you want it to be on each boot. You may start with the lazy route of using a persistent partition for your home directory. But it never feels quite right. But initially it’s so convenient to choose this path.

Read On →

NixOS ❄: tmpfs as root

This post covers both EFI and legacy boot setups.

One fairly unique property of NixOS is the ability to boot with only /boot and /nix. Nothing else is actually required. This supports doing all sorts of weird things with your root file system.

One way is to do like Graham’s post “erase your darlings” describes and empty your root file system each boot using ZFS snapshots. This way have some cool things that you could do on top of his setup, such as doing snapshots when it’s running and roll-back to empty on boot. That way you actually can go back to recover files you lost but still have an empty state.

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 →

Encrypted ZFS mirror with mirrored boot on NixOS

So for a long time I have wanted to replace my file server, because it’s an old HP Microserver that is really slow. And at the same time I have had this beast of a desktop tower PC that I haven’t used with a Xeon and 32GiB ECC memory that has just been turned off due to noise. The obvious solution is to re-purpose that install and move it to a location where noise doesn’t matter, e.g. the closet (a.k.a the server room) where the file server lives.

Read On →