Skip to content

Latest commit

 

History

History
56 lines (41 loc) · 1.44 KB

File metadata and controls

56 lines (41 loc) · 1.44 KB

Adding the NixOS-Hardware Module (Framework 12, 13th Gen Intel Core)

This provides the hardware channel steps for the NixOS on the Framework Laptop 12 Guide

Channel-based (default from graphical installer)

sudo nix-channel --add https://github.com/NixOS/nixos-hardware/archive/master.tar.gz nixos-hardware
sudo nix-channel --update
# /etc/nixos/configuration.nix
imports = [
  ./hardware-configuration.nix
  <nixos-hardware/framework/12-inch/13th-gen-intel>
];
sudo nixos-rebuild switch

Flake-Based

# flake.nix inputs
inputs.nixos-hardware.url = "github:NixOS/nixos-hardware/master";
# flake.nix modules list
modules = [
  ./configuration.nix
  nixos-hardware.nixosModules.framework-12-13th-gen-intel
];
sudo nixos-rebuild switch --flake .#<hostname>

Enabling the accelerometer and tablet mode

Tablet mode signals the desktop environment that the keyboard is folded back. libinput disables the keyboard and touchpad - firmware also does that. And GNOME/KDE enable screen rotation based on the accelerometer, see below.

NixOS 26.05 as of kernel release 7.0.12 (early testing with 7.1 appears to be the same as well in local testing from unstable)

Enable the following:

# Framework 12 tablet mode.
  boot.initrd.kernelModules = [ "pinctrl_tigerlake" ];
  hardware.sensor.iio.enable = true;