Tilling window manager for NixOS

To look for options I prefer to search through man configuration.nix and man home-configuration.nix for home-manager. Took me a while to discover this when I started using nixos. I used to rely on NixOS Search

1 Like

I am using i3 as the main window manager in NixOS and works really well without any major issues so far.
you can find many packages dedicate for i3 at NixOS Search

1 Like

You can search NixOS “options” to see which window managers can be enabled and some basic options in some cases.

https://nixos.org/nixos/options.html#services.xserver.windowmanager

I’m currently using Qtile, and quite often via vncserver, so I have a common/x.nix that I include in some of my configuration.nix files.

{ config, pkgs, ... }:

{
  environment.systemPackages = with pkgs; [
    # Qtile
    alacritty
    rxvt_unicode
    feh
    i3lock-fancy
    xidlehook
    firefox
    keybase-gui
    tigervnc
  ];

  #
  # Open ports in the firewall.
  #
  # 5900-5909: VNC Server.
  #
  networking.firewall.allowedTCPPortRanges = [
    { from = 5900; to = 5909; }
  ];

  # Keybase
  services.kbfs.enable = true;
  services.keybase.enable = true;

  #
  # X Server stuff
  #

  # compton
  services.compton.enable = true;

  services.xserver = {
    enable = true;
    layout = "gb";

    windowManager.qtile = {
      enable = true;
    };

    windowManager.default = "qtile";

    desktopManager.xterm.enable = false;
    desktopManager.default = "none";

    displayManager = {
      slim = {
        enable = true;
        ###defaultUser = "ian";
      };
    };

    ###displayManager.lightdm = {
    ###  enable = true;
    ###  greeters.gtk.indicators = [ "~host" "~spacer" "~clock" "~spacer" "~a11y" "~session" "~power"];
    ###};
  };

  fonts.fonts = with pkgs; [
    powerline-fonts
    font-awesome_5
    source-code-pro
  ];
}
1 Like

For Sway, see also GitHub - colemickens/nixpkgs-wayland: You should switch to nix-community/nixpkgs-wayland. -- This is now my personal dev fork.

2 Likes

Hello everyone,
I managed to install i3 works great, will try sway later on. I was asking for experience based advice.

Ari.

Is that repository still necessary? I thought sway and dependencies were in nixpkgs now?

I am using sway from nixos-unstable and it works great. Not sure if it’s available in 19.03.

nixpkgs-wayland can still be used if you want bleeding-edge versions.

thank you all for your valuable advice and provided information on the topic, it was very useful.

Live Long and Prosper :vulcan_salute:
Ari.

I was a fan of the ‘ion3’ tiling wm, so much that when the original author quit I ended up maintaining a fork, ‘notion’.

We’re gearing up for our next major release, ‘notion 4’. The nix build is still a work in progress though, Error with fontconfig when building with PRELOAD_MODULES · Issue #202 · raboof/notion · GitHub :wink: waves to @moaxcp

3 Likes

i3 / sway work OK for now, and nixOS is just my test pc for experimentation and my daily driver is Fedora for many years, so for now I am good with i3 / sway , I will give ion3 I try when I get the time.

Thank you for the provided information and for your contribution.
Ari.

ion3 hasn’t been maintained since 2009 so I’d argue that it’s not advisable to use it seriously.

I only came to know about it when I had installed the ion shell with nix-env -iA nixos.ion and was doing a nix-env -u and noticed it was replacing the shell with ion3 (same pname as the shell and a higher version number, nix-env isn’t super smart sometimes).

well my experiment PC is my 3-th PC at work connect via switch to change monitor+keyboard+mouse,
First and main driver is Fedora Stable (Fedora 30 now, soon 31), Second for work testing of apps and running bash scripts or other stuff that need high CPU/GPU this is SilberBlue Fedora rawhide (bleeding edge version) (Fedora 32 version now) and my older PC is more for experimenting and playing around with 2 HDDs, one arch one nixos. I have not used nixos for a long time but is works great and I like to experiment so when I find the time I will test out few tilling Window Managers on it, arch and nixos especially is kinda build for TWM, I use gnome on fedora, and i3/sway on SB Fedora32 so TWM is I am used to it and prefer keyboard over mouse usage. ion3 is on my test experiment list of TWM.

ARI.

We’ve been maintaining a fork under name ‘notion’, though! We have a new major version coming up, you can get a sneak preview through the nixos package at Comparing NixOS:master...raboof:notion4 · NixOS/nixpkgs · GitHub

1 Like

And for what it’s worth, I’ve been using the notion fork for the last few months, and I’m happy the project is still alive. :slight_smile: I used Ion a loong time ago, but finally gave up on customizing my systems because I hadn’t discovered Nix yet, and reinstalls were always such a pain. Now with Nix, my system is getting more and more customized…

4 Likes

Hello! Can you help me set up a NixOS installation similar to yours? I didn’t find it in the “configuration.nix” file the part where I should insert the script you shared. Is it in the same file or some other? Should I install the “home manager”?
I will be grateful for any help. :v:

At first, a part already set up like this:

  # Enable the X11 windowing system.
  services.xserver.enable = true;
  services.xserver.layout = us;
  services.xserver.xkbOptions = "alt-intl";

  # Enable the Qtile
  services.xserver.windowManager.qtile.enable = true;
  services.xserver.desktopManager.xterm.enable = false;
  services.xserver.desktopManager.default = "none";

After activating the settings the system does not start. Just a “_” cursor flashing on the black screen and you have to press “Alt + F2” to return to the shell.

Unfortunately I too have had trouble with Qtile on NixOS recently, something changed at some point that broke it.

I’m now using Sway, without a login manager, I just log in to the terminal and run sway.

I installed “sway” before and it didn’t work. Now I ran the “sway” command again and surprise! Only the mouse pointer appeared on the shell screen on which it is possible to slide across it. But no commands are accepted, not even “Alt + F2”.

Hmm, do you have a ~/.config/sway/config yet? I think I copied the one found at /etc/sway/config.

4.0.0 is now out and the PR to include it in nixpkgs is undrafted: notion: 3-2019050101 -> 4.0.0 by raboof · Pull Request #70610 · NixOS/nixpkgs · GitHub

4 Likes

Nice work, I’m looking forward to using it!

1 Like