Skip to content

Instantly share code, notes, and snippets.

@newtolinux23
Created July 4, 2024 20:11
Show Gist options
  • Save newtolinux23/7f2e7ce31cd3997cc9a11b5a55c29a6b to your computer and use it in GitHub Desktop.
Save newtolinux23/7f2e7ce31cd3997cc9a11b5a55c29a6b to your computer and use it in GitHub Desktop.
Pop-Shell on NixOS

Enabling Window Tiling in NixOS using GNOME

Table of Contents

Issue

I encountered an issue where I needed to enable window tiling in NixOS using GNOME. To address this, I decided to use the Pop Shell extension, which provides advanced tiling features.

Steps to Fix the Issue

Step 1: Install GNOME Tweaks

First, ensure GNOME Tweaks is installed to allow adjustment of various settings. Add the following line to the `environment.systemPackages` in `configuration.nix`:

environment.systemPackages = with pkgs; [
  gnome3.gnome-tweaks
];

Step 2: Add Pop Shell Extension

Add the Pop Shell extension to the list of GNOME Shell extensions.

services.gnome.extensions = {
  enable = true;
  packages = with gnomeExtensions; [ pop-shell ];
};

Step 3: Modify Configuration File

Update your `configuration.nix` file to include the Pop Shell extension and GNOME Tweaks. Below are the relevant parts of the configuration file:

{ config, pkgs, lib, ... }:
let
  secrets = import ./secrets.nix;
  gnomeExtensions = pkgs.callPackage <nixpkgs/pkgs/desktops/gnome/extensions> {};
in
{
  services.xserver.enable = true;
  services.xserver.displayManager.gdm.enable = true;
  services.xserver.desktopManager.gnome.enable = true;

  services.gnome.extensions = {
    enable = true;
    packages = with gnomeExtensions; [ pop-shell ];
  };

  environment.systemPackages = with pkgs; [
    gnome3.gnome-tweaks
    gnomeExtensions.pop-shell
  ];
}

Step 4: Rebuild Configuration

Rebuild the NixOS configuration to apply the changes:

sudo nixos-rebuild switch

Step 5: Restart GNOME Shell

Restart the GNOME Shell to enable the new extension:

  • Press `Alt + F2`.
  • Type `r`.
  • Press `Enter`.

Step 6: Verify Installation

Open GNOME Tweaks and verify that the Pop Shell extension is enabled. Configure the settings as needed.

Conclusion

By following these steps, I successfully enabled window tiling in GNOME on NixOS using the Pop Shell extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment