New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/systemd: add options for hardware watchdog management #92759
Conversation
@GrahamcOfBorg test systemd |
/marvin opt-in |
Hi! I'm an experimental bot. My goal is to guide this PR through its stages, hopefully ending with a merge. You can read up on the usage here. |
/status needs_reviewer |
Usage question: On my thinkpad, I already see two different watchdogs:
How am I supposed to know which one is correct? |
@flokli I note the same on my PC Engines apu4d4. I can confirm /dev/watchdog (the default) works but am rather new to the Linux watchdog subsystem and don't understand the meaning of the extra device node either unfortunately. |
hah, mystery solved: https://unix.stackexchange.com/a/401325 |
So |
Makes sense to me, thanks for the review and merge! |
Motivation for this change
I'd like to have systemd manage a watchdog device on one of my machines without having to write the appropriate lines into extraConfig. These options should also appear during a search for "watchdog" in NixOS options, which is what prompted me to figure out how to do this manually.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)See https://www.freedesktop.org/software/systemd/man/systemd-system.conf.html#RuntimeWatchdogSec= for a guide on the options being set here. I have a couple of questions:
The options have the suffix "Sec=" but expose a more general duration instead; is the "runtimeTime" and etc suffix I've chosen appropriate or should I go with what systemd uses: "runtimeSec"?
I know there are ways to type check a unit and it would probably be smart to check for a valid unit suffix on user inputs, but I'm unsure how to do so. Any pointers would be appreciated!
/cc @grahamc per our conversation in #nixos-systemd