Live data from Hacker News

NixOS on Framework Laptop

kvark.github.io

141–150 of 250 posts

Re: NixOS on Framework Laptop

#141

Earlier quoted context omitted.

I’ve only had mine for a day, but following the official PopOS guide[0] on the framework forums they advise manually setting mem_sleep_default to DeepSleep to override the default S2Idle, which was “burning through the battery” like crazy.” I’ve seen 5-6 hour runtimes with full brightness using with this option enabled (anecdata from a post on the framework or PopOS subreddit), which appears to be somewhat accurate w…

I'm seeing similar, maybe closer to 8 if it's mostly browsing and light IDE work, and I never run full brightness. I should probably chime in on the forum, but per that thread I tried Wayland but it didn't go so well, particularly with an external monitor plugged in. Too many misbehaving and misscaled apps, I remember having issues with vscode (scaling) and either kitty or alacrity (can't move or adjust window).

Interesting, that is very good to know. I have yet to try external monitors (will be plugged in tomorrow morning for work), but have been waiting on switching to Wayland to see if it’s necessary or not.

Great to hear about the 8 hour duration as well, I’m absolutely loving this new toy!

Re: NixOS on Framework Laptop

#142
post #44

Earlier quoted context omitted.

import framework.nix {}

The post itself shows that it is non-trivial to even boot this hardware with Nix.

The only issues were needing to disable secure boot (which is usually a required step on laptops preinstalled with Windows anyways), and using a recent Linux kernel that has the required WiFi driver. Which the tutorial linked in the post mentions.

And then Linux in general is notorious for having issues with USB WiFi adapters. More info on that can be found here https://github.com/morrownr/USB-WiFi

Re: NixOS on Framework Laptop

#143
post #135

Earlier quoted context omitted.

That is not true at all about cgroup2. Also think outside the box. Not everyone is using cgroups and namespaces. Some people are out there using gvisor, or KVM, or FreeBSD jails.

I'm not sure what you mean it's not true, AFAIK that constraint was the main issue with getting Docker moved over to cgroupsv2. (Edit: some background here https://github.com/opencontainers/runc/pull/2113 ) It's fixed now though so everything should work fine with systemd. If you aren't using cgroups and namespaces then you probably don't get much benefit from running a system like NixOS on bare metal either, so I'm…

Nix works on more than just linux.

Google Cloud uses gvisor for their K8s offering; AWS and Fly.io use firecracker for their container offerings.

Cgroups in v2 can be delegated easily and cleanly. As well as namespaced. Systemd or no systemd. Systemd just makes your life harder if you want to do rootless containers without integrating with them.

Re: NixOS on Framework Laptop

#144

Earlier quoted context omitted.

Yep, Framework (as far as I remember) intends to even create a public marketplace for people to sell custom-made addon cards. They have the dimensions on their github and make it pretty easy.

They already launched the marketplace, and … it’s just e-shop of their own cards.

Maybe because there aren't any mature alternatives yet?

Re: NixOS on Framework Laptop

#145
post #97
post #77

Earlier quoted context omitted.

I've been running Upstart (well, a fork I maintain) for over 2 years on my laptops and SBC. I'd like to use that. TBH I think NixOS might make it easier than other distros to run a custom init. I just haven't gotten around to importing my configs into a nix derivation.

If you have a parser for systemd unit files then you might have a chance to get that to work. If the whole reason you're doing it is to migrate back to upstart's syntax then it seems that would be not so useful, you might as well go in the other direction: write an upstart generator for systemd, and then you can just plug that into ordinary NixOS. Edit: Actually I think at some point NixOS did support upstart? Not su…

I'm not planning on working on anything related to systemd in the near future. If anything, I will write a config generator/type spec for startup/Upstart in Nix.

Re: NixOS on Framework Laptop

#146
"LUKS and Nvidia driver not compatible"

I've used Nvidia binary drivers with LUKS full disk encryption for years, on laptops and on desktops, and it's just fine. I can't even think of a possible way they would interact.

The framework laptop looks interesting, but there are so many misunderstandings or inaccuracies in this writeup that I personally do not trust the benchmarks or other details to be accurate.

Re: NixOS on Framework Laptop

#147
post #103

Earlier quoted context omitted.

NixOS is based on systemd. But it also seems like NixOS would be a great foundation to use something besides systemd. It would take some work of course, but it feels like you'd be mostly working with the OS rather than fighting it. However having used it, NixOS seems like it mitigates the worst aspects of systemd. It gets rid of that that /etc/systemd /lib/systemd symlink "cleverness" for overriding/enabling units. B…

The symlinking is one of the things systemd actually gets right on traditional distros. The files in /usr/lib are immutable data files shipped by the packages that you're not supposed to edit. The symlinks to them in /etc are configuration that you can change.

I get the rationale. it just makes for one more layer of indirection that you have to overcome when trying to figure out what the configuration actually looks like.

Re: NixOS on Framework Laptop

#148
post #135

Earlier quoted context omitted.

I'm not sure what you mean it's not true, AFAIK that constraint was the main issue with getting Docker moved over to cgroupsv2. (Edit: some background here https://github.com/opencontainers/runc/pull/2113 ) It's fixed now though so everything should work fine with systemd. If you aren't using cgroups and namespaces then you probably don't get much benefit from running a system like NixOS on bare metal either, so I'm…

Nix works on more than just linux. Google Cloud uses gvisor for their K8s offering; AWS and Fly.io use firecracker for their container offerings. Cgroups in v2 can be delegated easily and cleanly. As well as namespaced. Systemd or no systemd. Systemd just makes your life harder if you want to do rootless containers without integrating with them.

"Nix works on more than just linux."

IIRC the GP comment was asking about NixOS, not Nix. If you have everything already going through managed K8s or firecracker then I don't understand what you are using NixOS for. You could just install Nix on some other distribution that uses whatever init/container setup you want.

"Cgroups in v2 can be delegated easily and cleanly. As well as namespaced."

Right but none of those other things that were mentioned support cgroups delegation at an OS service level, only systemd does. Unless they have added this recently and I missed it. And if you're just using this to run a hypervisor then you're bypassing all that completely.

I don't see what you mean systemd makes it harder, you have to do basically the same process in any container manager if you want delegation. This is part of the design of cgroupsv2, it's not something systemd came up with. I'm sorry if I'm asking stupid questions but I honestly am really confused what your use case is, and your explanations are just making me more confused, so maybe something got lost here.

Re: NixOS on Framework Laptop

#149
post #4

> Mozilla requires LUKS full-disk encryption, and having it setup conflicted with NVidia’s proprietary driver I’ve seen this warning in the Ubuntu docs. Can someone explain exactly why a GPU driver would cause issues with disk encryption and UEFI boot?

n=1, but I've run fully-encrypted and /boot-encrypted Linux installs with the proprietary Nvidia-drivers without any issues. Of course the low-quality binary blobs Nvidia ships can always contain some annoying bugs, so maybe this was fixed already and the author is just cautious or maybe I will run into those problems eventually. I don't think it's a problem with the current iterations of Nvidia/Linux, though. As for…

I've used both for years without any issues, so I'm also confused on this one.

Re: NixOS on Framework Laptop

#150

Currently using my Framework laptop with Arch Linux. Was able to get everything working, including Bluetooth. Even got the battery life tamed. So far, my favorite laptop since the Thinkpad T42 I had back in the day (other laptops I’ve owned: 2013 MB Air, Dell XPS 15 9550, and a 2018 MBP)

I had a 1600x1200 T42p and loved that thing to death too. My fav laptop ever though was the original 15" MacBook Retina from 2012. I pre-ordered mine the hour it came available, as I had been waiting years for a good IPS HiDPI laptop. I had never even owned a Mac before that. Mine was one of the first off the line where the display had a temporary-burn-in (very long ghosting for any pixels that are fixed for more than 30 secs or so) issue. I got that replaced no-hassles under warranty a couple of months in.

My eyes were good enough then that I was running it at native 2880x1800 resolution (no HiDPI business), and I was finally happy with the resolution I could get while mobile (I had been using a 30" 2560x1600 as my workstation monitor for a couple of years at that point, and this was an upgrade over even that!)

These days I use a 55" 4K OLED and a 32" 6K Pro Display XDR as my workstation monitors. For anyone considering this, I'd say wait for the 40" 4K OLEDs to come out (or wall mount the 55" and set your desk half a meter or so away from the wall). I sit just a little more than arm's length away from mine, and that's great for immersive flight simulator experience, but not so great for normal daily desktop use. (I'm keeping mine on my desk so I can keep using it along with powered sit-stand.)

As for why it's not so great; it's mostly a resolution issue. 4K isn't enough these days, and isn't high enough DPI for the amount of my field of view it takes up at this distance. I would also be quite happy with an 8K OLED that's, say, 55" or 65"... but only when I can also get one that drives at 120FPS, so that will be a bit of a wait.

Post reply on HN