Skip to content

Commit 5edb6c1

Browse files
authored
Create nixOS.md
This adds a guide on how to set up Framework 12 on nixOS. This is my personal setup I have got using trial-and-error.
1 parent 5f84084 commit 5edb6c1

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

framework12/nixOS.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Framework 12 nixOS tweaks
2+
3+
[nixos-hardware](https://github.com/NixOS/nixos-hardware/tree/master/framework/12-inch/13th-gen-intel) repository provides some tweaks for Framework 12.
4+
5+
It can be enabled by adding the `nixos-hardware/framework/12-inch/13th-gen-intel` module to your nixOS modules.
6+
7+
## Enabling the accelerometer
8+
9+
The default configuration is suffering from the same issue as [ubuntu](https://github.com/FrameworkComputer/linux-docs/blob/main/framework12/Ubuntu-25-04-accel-ubuntu25.04.md)
10+
11+
This is the same fix applied on nixos until upstream is fixed:
12+
```nix
13+
nixpkgs.overlays = [
14+
(final: prev: {
15+
iio-sensor-proxy = prev.iio-sensor-proxy.overrideAttrs (oldAttrs: {
16+
postPatch = oldAttrs.postPatch + ''
17+
sed -i -e 's/.*iio-buffer-accel/#&/' data/80-iio-sensor-proxy.rules
18+
'';
19+
});
20+
})
21+
];
22+
```
23+
24+
## Gnome autorotate
25+
26+
To enable autorotation you need to install the `screen-rotate` gnome extension:
27+
28+
```nix
29+
environment.systemPackages = [ pkgs.gnomeExtensions.screen-rotate ];
30+
```
31+
32+
You can also in the Screen Rotate extension settings enable on-screen keyboard only in certain orientations.

0 commit comments

Comments
 (0)