Niri, Nix, Cachy, etc.
Niri updates
I mentioned in my last update that I was thinking of looking into Niri. Well I did it and I’ve been working with Niri for most of January now and am really liking it so far. I mostly just stuck with the config I used for Hyprland. I’m still using waybar and wofi with the same styling. I even used hyprlock, hypridle, etc. I’ve been solely focussed on playing around with Niri to see what makes it special.
For those unfamiliar with Hyprland or Niri, the main difference is that Hyprland is a tiling window manager, while Niri is a scrolling window manager. What that means is that when you open a new window in Hyprland, it resizes any current windows to make room for the new window so that all windows open on that monitor are fully visible. With Niri, it opens new windows in columns and those columns are infinitely scrollable to the left and right. So if you open a new window, it will open to the right of your current window. This may scroll other windows off the screen to the left.
There were a few things that took me a bit to get used to. Each monitor has it’s own workspace indices for one. So there will be a workspace 1 on monitor 1 and also on monitor 2. With hyprland, I had configured things so that odd numbered workspaces were always on monitor 1 and even numbered workspaces were on monitor 2 and I could setup window rules to open certain apps in certain workspaces and always have them open on the same monitor.
I ended up doing something similar with Niri by using named workspaces that described their main use. It also helped me to have control over the more dynamic nature of workspaces in Niri. For instance, without the named workspaces, it didn’t matter if I always put my reminna instances running on workspace 3 because if workspace 1 or 2 were ever emptied out, it would shift the workspace up. So I couldn’t rely on using a keybind like MOD+3 to always go to my remote desktop sessions. With named sessions, I can always guarantee specific workspaces on specific monitors.
One other thing that took me a little getting used it is moving between monitors. With Hyprland, since everything on the monitor is displayed at the same time, you can just use your normal keybinds for switching betweeen windows and it would just jump to the other window when appropriate. That doesn’t work quite the same on Niri. For instance, if you are on the left monitor and you move to the next window to the right, on Hyprland, that could be the next monitor to the right if you’re already at the far right. In Niri, you might actually have another hidden window to the right so it will move you there. For it to work the same, you’d need to first get to the last window before jumping to the right monitor would make sense. It doesn’t do that by default. There might be a way to configure it to do that, but honestly I haven’t looked because I’ve gotten used to just using a different keybind to switch between monitors. I’m not sure I’d want to have to cycle through a bunch of windows before jumping to the next window anyway.
A related item that took a bit to get used to was when moving the mouse between monitors. I initally set it up to focus the window as the mouse moves. But if a window is half off the screen and you cross it to move to the other monitor, it causes that window to scroll into view. That’s great when you want to go to that window, but feels a bit awkward when trying to just go to the next monitor. I updated the config so that it will only focus the window if it is already 100% on the monitor. It means that there are times I might not be able to auto focus just by moving the mouse, but it felt a lot better than the jumping around thing that was happening before.
Despite all of the little quirks I had to get used to, I have to say that I really like Niri. I like that I can set my window sizes and not have to worry that it is going to get changed when I open the next window. I love the scrolling window flow, and I think I’ll be sticking with Niri for a bit. That said, I know that Hyprland does have some extensions you can use to use a scrolling layout. That may be my next adventure in WMs…
NixOS updates
In a past post I talked about setting up NixOS on my spare gaming laptop. It’s been a good run there. NixOS has become one of my favorite distros right along side Arch based distributions. I love the declarative, reproducible aspect of it. When I decided I wanted to try and spin up a new NextCloud instance, I also decided I kind of wanted to set it up in a NixOS VM.
I’m not sure how long I’ve been running an Ubuntu Server VM on my TrueNas system, but it’s been about as long as I’ve had the TrueNas system setup, which is at least a few years old now. Before that I was running it either as a VM on my main system, or as a dedicated machine. I’ve had an Ubuntu server in one form or another for at least the past 10-15 years.
After getting some Nix experience behind me, I realized that it would be really nice if I had my self-hosted services in a system like that so that if I ever needed to rebuild them, I could just spin up an instance from the NixOS config.
When I started looking at setting up the new VM, I realized that TrueNas has had a lot of updates since I last did much with it. My system was still running on TrueNas Core, which was at its end of life. I decided to first update TrueNas to the latest TrueNas Scale version. One of the big differences was that Core was based on FreeBSD, while Scale moved to a Linux base.
Considering the migration made me even more certain that I wanted to try and switch over to NixOS for my self-hosted services. I felt like I could have easily screwed something up and lost my entire Ubuntu VM. If it had already been running on NixOS, it would be as simple as rebuilding from the config file. I made sure to back up the Ubuntu VM to be safe, but it still felt risky. Luckily, I was able to make the transition pretty smoothly.
I did not go right to the latest version of Scale after reading the documentation. A migration from Core to Scale was only supported up to a certain version, so I started there. Once I was upgraded there and confirmed my Ubuntu VM was still alive, I then upgraded to the latest version of Scale. It all went pretty well.
Setting up the NixOS VM was a lot of fun. Some services were super simple to get into the Nix configuration. Others, took a bit more work and a lot of consultation with Gemini. Gemini tried to suggest some things that I didn’t feel was very good advice, but we got all that sorted out. The biggest of those items was probably when Gemini gave me a configuration that would have put my Newt secrets in the config in clear text. When I pointed out how terrible an idea that is from a security standard, it quickly gave me an alternative suggestion to keep that sensitive data a bit more secure and not in a config file that will probably get checked into a git repo at some point.
Once I got all my current services migrated over, I setup NextCloud. I think NextCloud will mostly satisfy the cloud storage options I’m looking for. It did seem to be pretty bad when it came to dealing with photos and videos, though. It was slow, and trying to scroll down to older photos was a real chore. I also was annoyed that you are not able to add tags from the “Photos” section, and you are not able to add photos to albums from the “Files” section. It also didn’t pick up any of the tags that already existed in the exif data of most of my photos. I decided to give Immich a try.
When I saw that the recommended specs of Immich exceeded what I had allocated for my VM, I decided to take a different approach. I could have allocated more CPUs/RAM to the VM, but then that would have left very little for TrueNas to do its thing, which I wasn’t very comfortable with. However, I did have a laptop sitting around that had Fedora on it that I wasn’t using for anything else. A short time later, I had a NixOs system spun up on it that was identical to my VM, minus some services I removed because I don’t need them hosted on 2 machines. It only took a few lines added to the config to have Immich up and running and storing its files on my NAS. It only took about 10 min of playing with Immich to realize that for photos and videos, it was vastly superior to NextCloud.
I did something a bit different with this laptop install. I’m used to installing a headless version of Linux on VMs because I usually just interact with those via ssh anyway. Laptops I’ll usually install some GUI, even if it’s a super lightweight one. I decided not to do that here. So my new NixOS laptop has no GUI and is pure TTY. If I end up regretting that later I can always install something then, but for now it’s kind of fun to play with that way. The TTY has some additional limitations to it even over a terminal emulator such as not as many font choices and limited color choices. I think it’s going to be a fun experience. I also want to explore home manager on it at some point.
New Cachy system
Somehow, my wife convinced me that I should give World of Warcraft another go. I’m not quite sure how that happened, but I found myself installing Battle.Net under Faugus Launcher on the old gaming laptop that was running NixOS. Initial setup went great. I was able to get Faugus installed just by pulling it from the nixpkgs, and the install of Battle.Net from there was nice and smooth. WoW even installed great. Then I tried to run WoW and WoW kept crashing. I decided to run an update on the NixOS system because it had been a bit since I did that. After that, Battle.Net wouldn’t even launch from Faugus. The errors I was getting seemed to indicate some missing python packages.
I could have probably reverted back to my previous NixOS build and tried again, or tried to figure out why the python packages were suddenly missing, but I decided that this might be a sign that I should move the gaming laptop over to Cachy. From the beginning I always thought I would end up there eventually. The stay on NixOS lasted much longer than I expected. NixOS isn’t exactly known as a gaming distro, but it served itself well for running EQ2 and Minecraft. And since I had just added 2 new NixOS systems to my mix, I didn’t feel too bad losing this one to Cachy.
The install of Cachy was not without issues. I downloaded it, burned it to a USB stick and plugged it into the laptop to reboot and begin the install. Everything was spinning along great until it tried to re-partition the drive. I had told it to erase everything so it could start from scratch. For a bit, I was worried that maybe I had a bad SSD. Before jumping on Amazon to see how inflated SSD prices are, I decided to do the one thing you should do, but that I rarely do. I checked the sha hash of the iso to the known good sha. It was not the same. A few moments later, I had a new iso downloaded with a matching sha. After burning the new iso to the usb stick, the install to the laptop went as smooth as silk.
When presented with a choice of DE/WM, I briefly considered giving Cosmic a try, but in the interest of keeping everything nice and light, I decided to stick with Niri there. I’m glad I did because the default setup for Niri feels really nice. I’m liking the quickshell components and may have to steal some of them for my desktop Niri system. Some of the keybind choices are a bit questionable, but I quickly pulled the keybinds from my desktop config to remedy that. I’m not quite sure why Cachy thought it was a good idea to map the default MOD+SHIFT+SLASH for the keybind help to MOD+SHIFT+ESC… The slash also has the question mark so it makes way more sense to use for a “help” dialog. I ended up having to open up the config to try and figure out some of the default keybinds Cachy setup. It didn’t even display the help dialog on startup.
Cachy setup the default shell to fish. I haven’t used fish or zsh much, but have been planning to. I’ve been leaning more towards trying out zsh, but since fish is the Cachy default I’ll probably stick with that for now and setup zsh on my main desktop system soon.
So I guess since the last update the net distro results are: +1 for NixOS, +1 for Cachy, -1 for Fedora, and -1 for Ubuntu. Oh and I guess +1 for TrueNas Linux and -1 for TrueNas FreeBSD…