Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
i3-alternating-layout
Scripts to open new windows in i3wm using alternating layouts (splith/splitv) for each new window
-
autotiling
Script for sway and i3 to automatically switch the horizontal / vertical window split orientation
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Since various people are asking about xmonad-like tiling in wayland:
I wrote Vivarium[0] specifically to be a wayland compositor that behaves exactly like my (fairly simple) xmonad config, but it's a relatively new/unstable compositor and nothing like xmonad internally.
River[1] has a fantastic tiling model via user-provided executables, which makes it very flexible and probably a good fit for many people wanting something xmonad-like.
Waymonad[2] exists as a direct xmonad-like compositor, but I think development has been basically stalled for a long time. Sometimes there's discussion about reviving it though.
[0] https://github.com/inclement/vivarium
[1] https://github.com/ifreund/river
[2] https://github.com/waymonad/waymonad
- `flake.lock` is like your normal `Cargo.lock` that sets the exact commits of all inputs, frozing the versions of all software in your system.
This means I can mix things really nicely in my system. I can use the master branch of Sway, the pgtk version of Emacs with Wayland support from the emacs version control (not even master branch) and mix and match things from different NixOS versions. I can even fork the NixOS monorepo, do some changes and add them to all of my systems before the my PR gets merged.
The `flake.lock`, which I commit to my repository, forces every single computer I have to use exactly these versions of the software with the configuration I give. It will always lead to the exact same result when I `nixos-rebuild switch`. When I want to update my packages, I go to the repo and say `nix flake update`, then switch to the new versions and only if everything worked with the new packages, I commit the `flake.lock` and it works everywhere else the same.
The other nice thing I learned, is while at first the nixpkgs feels like a crazy mess and hard to grasp, it is actually one of the best package repositories I've used. Being a package maintainer is easy and a PR that follows good coding standards gets merged to the main repository no matter how experienced Nix developer you are. See my first package I started to maintain:
https://github.com/NixOS/nixpkgs/blob/master/pkgs/developmen...
These 23 lines of nix will fetch the package with the given tag from GitHub, check the file download SHA256 sum matches the given, check the vendored libraries SHA256 sum matches the given and then will just use the system `buildGoModule` function to compile the package and put it to your system. When their CI catches changes here, it will build a binary cache for the derivation, so most users won't even need to compile anything, but get a binary derivation with exactly the same result as compiling it by themselves.
And it's easy to see what gets added to your system. You can see the repo and read the code. You can use your editor, go on top of `buildGoModule` call and jump to definition, and you can read the definition what the function does. Now some users are running bots that just go through many packages in the nix repo, change the versions and SHA sums if they have updates and automatically generate pull requests, saving the maintainers the work to do it manually.
I understand this is not for everyone. But I hope I also could make you understand why there is no way of going back to systems like Arch Linux, Ubuntu, Windows or macOS after getting some proper taste how to do things with NixOS.
Here's my config so far:
https://github.com/pimeys/nixos
I'd like to see other configs from nix users here too if you're still here!
Bspwm is great too if you're interested in trying a tiling window manager. Have been using it almost exclusively for the last 2 years without too many problems.
[1] https://github.com/baskerville/bspwm
XMonad is the one thing I miss dearly from Linux since I had to switch to a Mac. With some effort, yabai [1] on Mac can approximate XMonad well enough (mainly, multiple workspaces, automatic tiling, focus follows mouse, and a few other key bits).
[1] https://github.com/koekeishiya/yabai/
I do miss being able to use Xmonad, but definitely checkout Amethyst[0] if using MacOS.
[0]: https://ianyh.com/amethyst/
- `flake.lock` is like your normal `Cargo.lock` that sets the exact commits of all inputs, frozing the versions of all software in your system.
This means I can mix things really nicely in my system. I can use the master branch of Sway, the pgtk version of Emacs with Wayland support from the emacs version control (not even master branch) and mix and match things from different NixOS versions. I can even fork the NixOS monorepo, do some changes and add them to all of my systems before the my PR gets merged.
The `flake.lock`, which I commit to my repository, forces every single computer I have to use exactly these versions of the software with the configuration I give. It will always lead to the exact same result when I `nixos-rebuild switch`. When I want to update my packages, I go to the repo and say `nix flake update`, then switch to the new versions and only if everything worked with the new packages, I commit the `flake.lock` and it works everywhere else the same.
The other nice thing I learned, is while at first the nixpkgs feels like a crazy mess and hard to grasp, it is actually one of the best package repositories I've used. Being a package maintainer is easy and a PR that follows good coding standards gets merged to the main repository no matter how experienced Nix developer you are. See my first package I started to maintain:
https://github.com/NixOS/nixpkgs/blob/master/pkgs/developmen...
These 23 lines of nix will fetch the package with the given tag from GitHub, check the file download SHA256 sum matches the given, check the vendored libraries SHA256 sum matches the given and then will just use the system `buildGoModule` function to compile the package and put it to your system. When their CI catches changes here, it will build a binary cache for the derivation, so most users won't even need to compile anything, but get a binary derivation with exactly the same result as compiling it by themselves.
And it's easy to see what gets added to your system. You can see the repo and read the code. You can use your editor, go on top of `buildGoModule` call and jump to definition, and you can read the definition what the function does. Now some users are running bots that just go through many packages in the nix repo, change the versions and SHA sums if they have updates and automatically generate pull requests, saving the maintainers the work to do it manually.
I understand this is not for everyone. But I hope I also could make you understand why there is no way of going back to systems like Arch Linux, Ubuntu, Windows or macOS after getting some proper taste how to do things with NixOS.
Here's my config so far:
https://github.com/pimeys/nixos
I'd like to see other configs from nix users here too if you're still here!
waymonad has a somewhat more active fork here: https://github.com/L-as/waymonad, but it's still just a one-man show that got picked up at ZuriHac 2021 and then failed to gather sufficient momentum.
As a maintainer of xmonad upstream, I'm watching the waymonad project to see where it goes, but I have some concerns about its architecture which I'd love to see addressed before we'd officially endorse people to try switching. This is a copy of a message I sent to fellow xmonad developers a couple months ago:
> We should certainly take a look sooner or later. From a quick glance, I have some concerns about the general design of it:
> * Aside from operational issues, this also means all of that needs to be implemented. There's https://github.com/swaywm/wlroots/ (used by waymonad), a library that supposedly lets individual Wayland compositors implement less code, but it doesn't seem to be nowhere near what X gives us: we take care of window management and all the input/output handling is taken care of by other tools with their own configuration and tools. It simply doesn't seem to work that way in the Wayland world. There are other options like implementing a shell plugin for Weston, or possibly other libraries, I don't really understand the landscape.
Since various people are asking about xmonad-like tiling in wayland:
I wrote Vivarium[0] specifically to be a wayland compositor that behaves exactly like my (fairly simple) xmonad config, but it's a relatively new/unstable compositor and nothing like xmonad internally.
River[1] has a fantastic tiling model via user-provided executables, which makes it very flexible and probably a good fit for many people wanting something xmonad-like.
Waymonad[2] exists as a direct xmonad-like compositor, but I think development has been basically stalled for a long time. Sometimes there's discussion about reviving it though.
[0] https://github.com/inclement/vivarium
[1] https://github.com/ifreund/river
[2] https://github.com/waymonad/waymonad
Since various people are asking about xmonad-like tiling in wayland:
I wrote Vivarium[0] specifically to be a wayland compositor that behaves exactly like my (fairly simple) xmonad config, but it's a relatively new/unstable compositor and nothing like xmonad internally.
River[1] has a fantastic tiling model via user-provided executables, which makes it very flexible and probably a good fit for many people wanting something xmonad-like.
Waymonad[2] exists as a direct xmonad-like compositor, but I think development has been basically stalled for a long time. Sometimes there's discussion about reviving it though.
[0] https://github.com/inclement/vivarium
[1] https://github.com/ifreund/river
[2] https://github.com/waymonad/waymonad
i3 has manual tiling by choice and it isn't necessary to port automatic tiling to i3 itself. You can make a service that utilizes i3's IPC that does that. And of course people have done so[1][2].
[1]: https://github.com/olemartinorg/i3-alternating-layout
> I'd like to see other configs from nix users too if you're still here!
Here's mine https://github.com/warbo/nix-config
I've used Nix/NixOS for about 8 years, but not delved into flakes yet.
I've been using XMonad for over 10 years now. Originally I went with Awesome but then decided I liked still having a normal desktop environment and XMonad's integration with Gnome was really easy.
The way I've done this has changed a bit over the years, these days I drop a file in .config/autostart letting xmonad replace the normal window manager after Gnome gets itself sorted out.
https://github.com/aclough/dotfiles