NixOS on the Framework Laptop 16

OMG, I’m right where you’re gonna be, right now. Somehow got my FW16 and am now trying to get NixOS up and going… I got the bare minimum Gnome install running at the moment, but really want to mess with Hyprland (I used i3 on an Arch system for about 5 years) but also am a big City Skylines nut and need Windows on here for that as well.

@CodeMichael How can I satisfy my Unixporn urges along with my wannabe city planner desires while still having a good Evil Emacs setup for the devops stuff I do?

Why not play Cities Skylines with Proton on Linux? Both 1 and 2 run great.
With Gamescope you also won’t have any of the wayland-specific issues that arise with tiling window managers sometimes.

1 Like

Agreed that running native is often great and I love not dealing with windows at all, but if you want to run a windows vm and attach your dgpu to it, you can do that too.
There are several links to git repos in the VM thread with details on how to get that running. My personal repo needs updating but the version that’s in there has a bunch of good info and should be able to get you running.

Where are your pain points? Nothing you’re saying seems to be exclusive.

I’ve been using Sway on my desktop for the last 5 years or so, and I’ve been pretty happy with it in general. I’ve been trying hyprland lately for giggles, and there are some things I really like about it, but I’m not sure I’m going to stick with it as I’ve hit quite a few bugs when trying to play steam games and I’m not sure why but I’m also not sure I’m motivated to figure it out. I think I’m going to check out the state of Cosmic before going back to Sway, however.

I had no idea… I’ve been away far too long. OK, let’s do that then!

You know what? Yeah I’d like to try Cosmic myself before anything, PopOS fan that I am.

So how do I get this going then? Right now I’ve managed just the minimal Gnome NixOS install. Everything seems to be up and running except for

  • the RGB controllers for the keyboard and macropad… (via in the browser isn’t connecting and I’m sure that’s a rabbit I’m gonna hate.)
  • The trackpad doesn’t turn off when I’m typing. I’ve dealt with this before on another linux distro way back, and it took me a bit to figure it out. Ahh, nostalgic…
  • Bluetooth is borked… I know it worked on the live USB so not sure whats up with that…

So I’ve got my job ahead of me. If all I need to do is do a sudo nixos-rebuild switch on another config and take care of these issues quickly so I can get to tinkering I’m all for it, otherwise I’m probably going to pop Ubuntu on the other drive so I can have something stable to work with when I get back to work Tuesday…

Also had that issue, most issues like that are solved by adding the nixos-hardware Flake for the Framework 16. See here GitHub - NixOS/nixos-hardware: A collection of NixOS modules covering hardware quirks.
Or if you don’t want to add the nixos-hardware flake, you can also just add hardware.keyboard.qmk.enable = true to your config to get it to work.

On Wayland this is dependent on the compositor, since here the compositor manages libinput. Check your compositor’s/desktop’s config to see if you can find anything.

Check if Bluetooth is blocked with rfkill list all. If it is, unblock it with rfkill unblock bluetooth or whatever it is called in rfkill there.
If it still doesn’t work, check Bluetooth - NixOS Wiki.
Normally, any desktop you use should already do that, but there shouldn’t be any harm in adding the config twice.

1 Like

So I just got nixos installed with gnome. No ability to right click on the touchpad though. Anyone know how to solve that?

EDIT: Solved: Apparently gnome does a stupid gesture to right click now where you have to hold the pad and tap a second finger. Anyone know how to nixos this back to regular?

Did you have to make any changes to the keyboard’s device permissions? I’ve seen other distros talking about changing the udev rules for the device. The VIA tool recognizes my keyboard but it doesn’t connect for editing, citing a bad protocol version.

See the first section of here

Yeah that’s working great. That nix-hardware flake is nice. I understand why they are just including everything is to reduce and reuse, but it makes a convoluted mess to follow. I wish it had a way to parse an entire config into one file and just include that so I could archive it with my own build and read through the Framework 16 specific modules better.

Is there a live chat for Framework 16 and NixOS anywhere? Element/matrix? Discord? Or just this discourse topic?

So I have a couple questions: On battery, at least, I’m noticing the panel brightness jump up and down on its own instead of staying where I set it. How do I stop that?

Second: powertop says I’m using 18-20w of power just browsing the web with firefox. My battery lasted about 5.5 to 6 hours tonight from 100% to 10%. Is there anything I can do to increase battery life? No games, just browsing, typing in the console, and watching ‘bottom’ show me the cpu graphs.

I have configured with a flake using the nixos-hardware framework 16 profile. I did rebuild the system about 24 times today. That’s the most demanding thing I did.

Regarding battery, you may want to checkout power profiles daemon and which profile are you currently using: on the power-saver profile I can get down to ~10W.

I assume the screen brightness adjustment is Gnome doing its thing: Enable automatic brightness

As pdp said, check your power profile (gnome power settings, I believe). It should say either performance, balanced, or power save. Power save is the one you want for optimal battery.

I haven’t spent any time there, but there is a nix space on Matrix, and there’s a Framework room: https://matrix.to/#/#space:nixos.org

1 Like

Thanks, and @pdp too. I am pretty sure I have power profiles daemon but how do I ensure it’s in charge and running?

The simplest way to check it is to call powerprofilesctl, which will show the available profiles and the current one:

❯ powerprofilesctl
  performance:
    CpuDriver:	amd_pstate
    PlatformDriver:	platform_profile
    Degraded:   no

  balanced:
    CpuDriver:	amd_pstate
    PlatformDriver:	platform_profile

* power-saver:
    CpuDriver:	amd_pstate
    PlatformDriver:	platform_profile

Oh, nice. thanks. I found the Nix/NixOS channel but I didn’t realize there is a whole space. I’ll check it out.

Is anyone else experiencing issues with their laptop not turning off? Systemd shutdown finishes execution and then I am greeted by a perpetual black screen. I have to hold down the power button to turn it off this happens on unstable and 24-05.

I also have this issue. I tried updating the firmware with fwupd, but that didn’t fix it. It occurs on both my NixOS install and on the NixOS live ISO (I’ve only tried the minimal installer), but not on the live ISO for any other Linux distro I’ve tried.

What kernel are you on? A lot of people in the Discord have been having power issues with shutdown that were resolved by updating the kernel to the latest 6.9 release.

For some reason, the default kernel included with NixOS is fairly old.

2 Likes