Skip to content

staging: 2025-10-02#60

Merged
Frontear merged 22 commits into
mainfrom
staging
Oct 2, 2025
Merged

staging: 2025-10-02#60
Frontear merged 22 commits into
mainfrom
staging

Conversation

@Frontear

@Frontear Frontear commented Oct 2, 2025

Copy link
Copy Markdown
Owner

A pretty eventful cycle of changes this time around. Switching to Niri as my main compositor has been a great pleasure and definitely the biggest change to the environment. There have been some minor cleanups of modules and environment configuration, with nothing really being a backwards incompatible change. Overall, the system is more usable and still just as functional as ever. There will be a lot of noisy changes to modules in the next cycle, hence why I wanted to push this cycle forward before I get caught up in that.

Things Done

  1. Drop Sway in favour of the Niri compositor. There have been a lot of accompanying changes so I'll try to summarize. Most of my applications and services were migrated with little to no issues. UWSM was removed because Niri has its own systemd service, and calls to uwsm app were migrated to app2unit, and given a wrapper to fix the weird issue with Microsoft Edge failing to shutdown correctly. A proper polkit agent was added and a proper secrets service implementation, both from GNOME since Niri recommends these. The fs derivation for Niri was removed in favour of writing configuration directly in Nix, getting rid of the unnecessary indirection from pkgs.callPackage whilst retaining all of the power and flexibility of Nix to pre-process the configuration. Scaling was dropped to 1.25 from the original 1.5, which feels roughly the same visually but significantly nicer for applications that looked too big with 1.5x scaling, particularly the Electron apps. Finally, a variety of small little changes and fixes were made to improve the reliability of the environment. (80df3ea, 4ca1dfb, ba2983f, 1f26a37, 3df9568, 89f12a7, 5477364, 0e5d163, c2ec200)
  2. Drop the Zed editor. It's simply too impractical to use on NixOS for me to justify keeping it around. While I did love the simplistic UI, everything else basically made it impossible to justify, and so off it goes. I somewhat doubt it'll ever be back, but if it does, I expect that there have been some major improvements to the editor. (d996353)
  3. Re-organize and de-duplicate modules. There have been a few iterations of changes laid out in Re-structure modules and remove modules/*/upstream #53, and there will continue to be more in the next cycle. (ead7a36, e4dd8bd, d194a5a)
  4. Fix the benchmark workflow failing to trigger on a push to master. This will actually be the PR that will test whether or not this works, so fingers crossed. (a04108b)
  5. Patch yubioath-flutter to correctly work until an upstream bug is resolved. The issue is an incompatibility with ykman and the flutter application, and until a fix lands in Nixpkgs, this hacky overlay thing is the best I got. (a44c0a2)
  6. Migrate the ISO to GNOME and enable swap on zram by default. Using GNOME instead massively reduces the build times of the ISO on systems where both hosts are built, since there are a lot of derivations that can be shared, and enabling zram by default was just a logical decision since I don't expect to use anything else. (7e1bb72)
  7. Fix secret service detection when using Element, due to some stupid bug in Electron. (8e0a250)
  8. Add some generic manual pages to my system for ease-of-use. Unfortunately I can no longer type man confi<TAB> and expect it to immediately fill configuration.nix, because there are too many different man pages that collide with that naming. Pretty unfortunate.. (f5778dd)
  9. Add more proprietary Microsoft fonts for Libre Office. (2837f33)
  10. Execute switch-to-configuration boot instead of a switch for nixos-clean. This massively saves execution time by removing an unnecessary re-deployment step. (71a06ef)
  11. Update the lock file. Not many updates this cycle funny enough. (d9e1444)
  12. Add Legcord to my GNOME specialisation, for convenience. I would've preferred Obsidian but it's not something I have time to experiment with setting up right now. (7c9c551)

This had been coming for a while, but it's only today that I finally got the chance to sit down and make the change. It's actually quite nice that majority of my configuration was transferable with no major issues.

Niri fulfills the scrolling + tilling combination so much better than what Sway w/ Papersway could. This is definitely going to be my final compositor experiment, I don't see myself switching to anything else after this.

Most of the stuff in this PR was simple transitions. There wasn't much attempt to tap into Niri's flexibility, that's for the future.
I'm not going to do into a whole rant about the problems with this editor, instead I'm going to focus on the problems with using it on NixOS.

Extensions do not install automatically, despite declaring them in the home-manager module. It only "encourages" Zed to install them after startup.

The `settings.json` and `keymaps.json` are both impurely placed on the system by home-manager. I assume there must be a reason though I did not dig into it.

Extensions use some downloaded `node` binary to download and install LSPs, kind of like `mason` for Neovim. This is a no-no for NixOS.

Using this editor is more trouble than it's worth. VSCode by comparison is a lot easier to work with, since tooling has been built around it's existence in the Nix ecosystem. Maybe Zed will have the same tools in the future. For now, it's not worth it.
This progresses the goals of #53. I would like to think I caught everything. This is a nice overhaul that removed "wrapper" module options that we don't need, and moved some things from `my.*` modules to their home-manager variants. It's also killed `modules/*/upstream`.
Firstly, we've finally added a proper polkit agent. Sway never had one, Niri is the first. I chose to use GNOME's agent since Niri already uses a lot of GNOME/GTK things as defaults and/or recommendations.

Second, I overrode the Niri XDG Desktop Portal configuration to accept any file manager for the "file chooser" dialog. The GNOME Portal, which was preferred, enforced Nautilus, and I don't use Nautilus. Rather, I use Thunar, so I needed to overwrite this.

Lastly, I added a new keybind Mod+L to lock the screen, and I updated the Mod+{Down,Up} and Mod+Shift+{Down,Up} keybinds to move workspaces when possible. I wanted to try and bend Niri to make my workspaces feel static, but I'll be flexible and try to make this dynamic workspace stuff work.
The config is still just a big chunk of lines, but it allows me to interop values from the rest of the config into it. I've also taken the liberty to re-organize a few modules, as well as add 2 new programs to my little bar at the bottom, Legcord with Discord's icon, and OBS Studio.
This makes it feel closer to a real desktop experience.
I've had to manually start it via `workflow_dispatch`, which is kind of inconvenient.
You may notice that my GPG public key has slightly changed. Long story short, my subkeys expired and during the time that I took to renew them, I decided to delete my old identity off of the key. I made this change gracefully, by keeping both identities for almost a year before now erasing the old one. Going forward, this is my one and only official identity for online purposes.
This has become default behaviour starting from v0.5.0, which has landed in `nixpkgs/master` and should end up in `nixos-unstable` soon.
Using GNOME for the ISO instead of KDE will reduce the overall build time on my system because it can re-use many of the derivations from my GNOME specialisation, rather than needing to pull the KDE ones. Build times shot down significantly by doing this change, so I'm pretty happy with it overall.

I've also enabled **zram as swap** configuration by default for my system, simply because I don't use swap files/swap devices, and don't plan to.
Stupid Electron bug. I don't know why Microsoft Edge doesn't have the same issue, since Electron and Chromium share the same APIs for detecting this sort of thing (via `os_crypt`).
Closes #58. I scaled up some of the base fonts heights, which correctly propagated to all of my things. I'm actually quite happy with how simple of a change this was. I also took the liberty of changing the date format for `swaylock`, so it doesn't keep overflowing outside of the little circle.
I'm used to having them, and I like to reference them at random times, particularly when I'm researching subsystems of the kernel. It's a little annoying that they don't exist by default, so let's make it so.
Fairly self-documenting, Microsoft Edge was the main culprit and motivation for this.
This brings more proprietary fonts from Microsoft like Calibri. I originally thought they were part of `pkgs.corefonts`, but I realize they are not.
The home-manager stuff hasn't been relevant since they dropped creating profiles for the NixOS module, and hasn't even been doing anything for the past few months. I've switched the `switch-to-configuration` call from `switch` to `boot` to avoid an unnecessarily heavy context switch and just update the bootloader entries. Finally, since I dropped the home-manager stuff, I can now allow this application to run as root, which allows me to use whatever escalation program, like `run0`.

This closes #59.
Moved the `pkgs.nerd-fonts.symbols-only` snippet to a common module. Although it's not the best solution, it's a little better.

Moved some git configuration to the module, because it's a sane default.

Moved some zsh configuration to the module for the same reasons.
Long story short, I use Discord to occasionally dump notes from class (usually off of my iPad) and it's a bit of a hassle to try and access the notes from my laptop when I need them. I considered trying to use Obsidian, a markdown note-taking application, but setting up a free sync that would just work on both my iPad and laptop proved to be a bit too much of a hassle to explore. As such, I'm just bringing Discord (via Legcord) to my GNOME specialisation. To try and keep myself from being needlessly distracted, I'm using a different account that can still access the notes, but does not have many of the other servers.

I might explore using Obsidian in the future, but for now it's a bit too involved for me to waste my time on.
See #53 for the details surrounding this change. This is the initial commit for this, which means that there is a LOT of work that needs to be done. Rather than trying to do it all in one commit I wanted to split it up across multiple (which is the correct way to be doing this stuff anyways).

For starters, `lib.mkModules` need a massive overhaul so that it can perform most of the heavy lifting for module files resolution. This will allow me to drop all of the `module.nix` files that exist only to import `options.nix` and `config.nix`, simplying my structure considerably.

After the overhaul, I need to move modules around to have them match the expected structure. This is definitely going to be the easiest part.
@Frontear
Frontear merged commit d194a5a into main Oct 2, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant