NixOS on the Framework Laptop 16

I’ve added it and received no errors. Via doesn’t seem to recognize a keyboard, is there some other way to test you can recommend?

nevermind, found it. Appears to be working.

1 Like

Given it’s potential increased reusability, I’m kinda tempted to skip customizing through QMK and go instead with kmonad (which has a NixOS module)

Since it seems like many of you are familiar with impermanence on NixOS, I was wondering if any of you have tips for how I could my issue regarding IME I posted about on the NixOS forums. My Framework16 is arriving on Monday and I’m hoping to have everything ironed out by then :sweat_smile:

I’m not familiar with the tool you’re trying yo configure but worst case scenario, you can always configure it manually and persist it :wink:

hello

I couldn’t get the fingerprint reader to work.
How did you configure it ?

for my curiosity, could you show me how you configured power management and dgpu?

thanks

For the fingerprint reader I did nothing special, I enabled the fprintd service.

services.fprintd.enable = true;

then I enrolled

sudo fprintd-enroll $USER

I’ve also done nothing special with power management. The recommendation from framework is to use power profiles daemon. (I was hoping to use TLP, but for now I’ve just set the battery max to 80 in the bios).

services.power-profiles-daemon.enable = true; 

I’ll have to get back to you on the dgpu stuff when I have a little more time.

2 Likes

Thant, this work

I’m running NixOS on my batch 3 unit currently. I am just using the framework 13 amd hardware configuration for now, because I don’t feel comfortable doing my own yet…

I’m running a flake based setup, and I’ll share my config later today once I get my git repo connected to github. Be forewarned, I’m a nixos novice, so my config may have some bad style/patterns, but it seems to be running great on my system so far.

I’ve been experimenting with power draw on PPD vs TLP, and my experience is that TLP, at least on unstable is just fine. PPD seems to hit a slightly lower aboslute minimum power consumption at dead idle (6.5W vs 7.5W), but actually doing anything has them consuming about the same amount of power. Looking at cpu statistics, it seems like PPD allows the cpu to get all the way down to 400MHz at idle, while TLP bottoms out around 1GHz. The other advantages it provides in terms of configurability have been worth it for me though. Especially using the “guided” cpu mode with a frequency cap (at 3.5GHz currently) has been great. The laptop still feels plenty fast for light work, and the fan never spins up during burst-y workloads, or light gaming. I’m not super well informed on why PPD is preferred, but the thing about the AMD P-states seems to be supported by TLP according to this documentation: Processor — TLP 1.6 documentation Maybe someone more technically knowledgeable could point out any other disadvantages of TLP.

edit: after doing some more testing with different workloads, it seems like the PPD power-saver profile also has some more aggressive cpu frequency limits of some description which ends up in better consumption figures in some things… this power management stuff is a deep rabbit hole for sure with the pstates and the epps and the governors etc. I’ll post some more benchmarks in the future, but I’d love to get some technical insight from someone who really knows their stuff.

I spent like an hour yesterday trying to get the fingerprint sensor working, and this was my issue lol. I had just enrolled my fingerprint for root rather than my user. Thanks for the tip!

1 Like

Interesting stuff, I’m looking forward to seeing your config (and working on getting my own posted soon, hell week at work)

Actually found some time to do it right away. Here’s my config fwiw.

2 Likes

Received mine today, glad to say I have NixOS up and running while typing this post! I’d like to experiment with fancier stuff but at the moment I’m happy to have my usual setup.

2 Likes

I am looking forward to not being underwater with work so that I can dig into your repos a little more. I love what I see so far!

The only fancier thing that is harder to retrofit on an existing system is impermanence, but it’s very far from being necessary.

Batch 4 here…

I received my FW16 on Monday. The NixOS install was incredibly straightforward, with no driver or other obvious issues. I’m still making time to test a few things, and to do some power tuning. My idle power consumption is sitting around 12W, which is more than I am comfortable with but not actually bad. I won’t have time to jump into that for a few weeks, though.

My HW configuration, for reference:

Susan’s Framework Laptop 16 DIY Edition

  • Ryzen™ 7 7840HS
  • Expansion Bay Shell (no dGPU)
  • DDR5-5600 - 64GB (2 x 32GB)
  • WD_BLACK™ SN770 NVMe™- M.2 2280 - 2TB
  • Laptop Bezel Black
  • Keyboard: International English - Linux
  • Numpad Module
  • I/O Expansion cards:
    • USB-A x1
    • USB-C x4
    • HDMI x1
    • Ethernet x1
    • Audio x1

It should be easy enough to get the power consumption down to less than 8 watts at idle with the screen at minimum brightness if you are using power profiles daemon for power management. Screen brightness does have a non-linear effect on power consumption though. If you use brightnessctl to set the underlying value between 0 and 255, a value of 50-80 is perceptually “50%” brightness, but consumes about a quarter the power of full brightness.

There is also the ABM feature for the panel that adjusts brightness based on screen content, and it is very subtle at lower levels (I have it at 1 out of 5), and that can save some battery too. See Mario Limoncello’s excellent work on that over on this thread: Adaptive Backlight Management (ABM)

TL;DR it should be coming to mainline linux in 6.9, or maybe later, and it should already be supported in PPD 0.20.

1 Like

Thanks for the info!

Hey everyone, spent quite some time trying to set up nix on my Batch 4 FW16. I based my config off the popular nix-starter-configs so they would be easier to understand for others and got it to a baseline I’m satisfied with. I hope my config can be helpful for others. My first time using nix so any feedback would be appreciated.

Here are the features of my config:

  • Root + Home Impermanence using encrypted ZFS datasets (you may have to adjust your disk path if you only have 1 ssd installed)
  • Fully automatic 1-command install and disk provisioning using nix-anywhere (see test.sh) and disko
  • home-manager + NUR for Browser Extensions
  • Secrets management via sops-nix. You will need to provision sops private keys to the target system manually at the moment.
  • Based on nix-starter-configs so hopefully easier for noobs like me to understand than configs from nix gods
  • Uses framework13 nix-hardware config
5 Likes

I hadn’t seen that example config repo before. I bet I can improve my config a lot by taking some features and best practices from it. Thanks for sharing!

Your config link is a 404 for me

Thanks for letting me know. Had my user visibility set to private. Should be accessible now!

1 Like