Better HN
topnewbestaskshowjobs
Log inSign up

secure

5,258 karma · joined Jul 12, 2011 (15y ago) · 557 submissions

Submissions

comment 1y ago · link · parent

Yes, I use this same config snippet throughout my installs and haven’t gotten around to managing my home with Nix yet.

Later, I refactored this config snippet into a Flake that I include: https://github.com/stapelberg/nix/ …but that’s for a follow-up blog post :)

comment 1y ago · link · parent

Welcome to Linux!

I agree that through the lens of “how much time do you save?”, automating a NixOS installation is not worth it. As you describe, it’s just a few interactive commands in the upstream installer.

But from the perspective of “how much effort is it to spin up a new VM for this new project / task?”, spending the extra few minutes on building the fully automated installation path is well worth it. Also consider the perspective of “how many steps does it take to recover this VM in a disaster scenario?”, where reducing the manual steps to a minimum is very helpful.

BTW, the maintenance of the installer is virtually free: The configuration I show is the configuration I use in NixOS as well, so that needs to be updated anyway. Aside from that, to rebase my installer from NixOS 24.11 to NixOS 25.05, I just changed a number. When setting up a new machine, I can either download the upstream installer and write it to a USB stick, or I can change a number, rebuild (< 2 minutes) and write to a USB stick. Really not much difference.

comment 1y ago · link · parent

> Almost none of the packages the author listed get used, including zsh

Just to clarify: the point of having packages like lshw and zsh available is not for the case of performing the automated installation (where, yes, they are not used), but for the case where I want to interactively poke around in a booted installer to inspect the target system.

comment 1y ago · link · parent

Glad to hear that the article describes exactly what you need :)

Try out building an installer and run it in a VM, it only takes a few minutes!

comment 1y ago · link · parent

Yes. I also submitted my article myself (https://news.ycombinator.com/item?id=44148997), but the upvotes came in on this duplicate submission.

I don’t know who todsacerdoti is, but looking at their submission history, it looks like this account automatically cross-posts from other sites (maybe lobsters?)

36.

How I like to install NixOS (declaratively)(michael.stapelberg.ch ↗)

164 points · by secure · 1y ago · 134 comments

comment 1y ago · link · parent

True, but I tested the Radeon RX9070’s power consumption with a 4K monitor.

  * ASUS, builtin-GPU@4K: ≈39W
  * ASUS + nVidia GF4070@4K idle: ≈50W
  * ASUS + radeon RX9070 (Linux 6.15): ≈80W

comment 1y ago · link · parent

> It isn't clear to me but is the author indicating that Linux kernel support for 2.5GbE is still early stages, would it be better to wait a while before getting a motherboard with 2.5?

If you want to play it safe, waiting longer before buying new hardware is always a good strategy. As I wrote, though, aside from needing a new firmware package, I did not notice any issues with the 2.5G support in the end.

> There's a diff being presented between two lshw outputs? How is that diff shown?

I ran lshw > lshw-intel-285k-asrock.txt when I used the ASRock board and lshw > lshw-intel-285k-asus.txt when I used the ASUS board. Then I ran diff -u lshw-intel-285k-asrock.txt lshw-intel-285k-asus.txt and copy&pasted (parts of) the output into the blog post.

39.

My 2025 high-end Linux PC(michael.stapelberg.ch ↗)

26 points · by secure · 1y ago · 9 comments

comment 1y ago · link · parent

Thanks for the advice. I try switching to Wayland every year, but it has never worked without heavy graphics artifacts / flickering / glitches on any of my machines (I use an nVidia GPU so that I can drive my Dell UP3218K monitor).

Meanwhile, X11 works really well for me. No tearing, no artifacts, no breakages on upgrades. Really can’t complain.

Maybe next year.

comment 1y ago · link · parent

Yes, I didn’t want to analyze and compare different solutions, I just wanted to share the joy of finding a solution that works well for me.

Using hot keys is nice, but hot keys (intentionally) don’t work while my screen is locked. I contemplated mapping an xrandr call onto a smart button (Shelly Button 1, essentially triggering an HTTP request), but in the end grobi has the same effect and is even more convenient than having to press buttons.

comment 1y ago · link · parent

The Dell UP3218K monitor I describe does not work “out of the box” on any OS. Even finding a GPU that can drive it at all is tricky.

43.

In praise of grobi for auto-configuring X11 monitors(michael.stapelberg.ch ↗)

75 points · by secure · 1y ago · 48 comments

comment 1y ago · link · parent

I use this bootloader in gokrazy and blogged about debugging a limitation in it a while ago: https://michael.stapelberg.ch/posts/2024-02-11-minimal-linux...

comment 1y ago · link · parent

Indeed! Have a look at http://github.com/stapelberg/rsync-over-grpc/, where I demonstrate how to use the rsync protocol (specifically, my https://github.com/gokrazy/rsync implementation) over gRPC.

Very handy if SSH+rsync is locked down in your corporate environment, but building services with gRPC isn’t :)

comment 1y ago · link · parent

I looked at openrsync when I was writing my own https://github.com/gokrazy/rsync implementation (in Go!) and it’s good code :)

It’s a shame that openrsync is not 100% compatible with rsync — I noticed that Apple was starting to switch to openrsync because my own tests broke on macOS 15.

47.

Tips to debug hanging Go programs(michael.stapelberg.ch ↗)

2 points · by secure · 1y ago · discuss

comment 1y ago · link · parent

> Now the objects are no longer threadsafe. You can't just read a message in one thread and process it in two different threads.

This is not correct. The Opaque API provides the same guarantees as before, meaning you can read a message in one goroutine and then access it (but not modify it) from other goroutines concurrently.

comment 1y ago · link · parent

> Great, now there's an API per struct/message to learn and communicate throughout the codebase, with all the getters and setters.

No, the general idea (and practical experience, at least for projects within Google) is that a codebase migrates completely from one API level to another. Only larger code bases will have to deal with different API levels. Even in such cases, your policy can remain “always use the Open API” unless you are interested in picking up the performance gains of the Opaque API.

50.

Go Protobuf: The New Opaque API(go.dev ↗)

287 points · by secure · 1y ago · 212 comments

51.

Testing with Go and PostgreSQL: Ephemeral DBs(michael.stapelberg.ch ↗)

4 points · by secure · 2y ago · discuss

52.

Debug Go core dumps with delve: export byte slices(michael.stapelberg.ch ↗)

2 points · by secure · 2y ago · discuss

53.

A Signal run a day keeps the un-link away(michael.stapelberg.ch ↗)

4 points · by secure · 2y ago · discuss

54.

Ryzen 7 Mini-PC makes a power-efficient VM host(michael.stapelberg.ch ↗)

22 points · by secure · 2y ago · 12 comments

comment 2y ago · link · parent

The 3? (4?) video recordings I watched from FOSDEM 2024 all had bad audio :( sounded overdriven to me

56.

Minimal Linux Bootloader debugging story(michael.stapelberg.ch ↗)

101 points · by secure · 2y ago · 3 comments

57.

Systemd: Enable indefinite service restarts(michael.stapelberg.ch ↗)

126 points · by secure · 2y ago · 78 comments

comment 2y ago · link · parent

The Debian patch for this setting is: https://salsa.debian.org/kernel-team/linux/-/blob/master/deb...

The decision made there is from 2013 (see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=712740), so it might be worth revisiting.

Could you file a bug report to get the discussion started?

comment 2y ago · link · parent

I don’t know where you got the impression that the Go compiler would run on “the production machine”.

gokrazy images are built whereever you like (typically your PC, or some more automated setup) and then deployed to the target device. There is no Go toolchain on the target device.

12345
19