-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
nixos/lact: allow configuring declaratively #427876
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
Conversation
116310b
to
3059a5c
Compare
3059a5c
to
9f5bc99
Compare
9f5bc99
to
e2a516c
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
||
::: {.note} | ||
When `settings` is populated, the config file will be a symbolic link | ||
and thus LACT daemon will not be able to modify it through the GUI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, late to the party.
LACT daemon will not be able to modify it through the GUI
Since the daemon is run as root, I think it can modify any file if it really wants to. Have you tested that the daemon will not modify it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can't modify it, because the actual config is in nix store if configured using this option. Nix store is not even writable to root by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know nix store is mounted read-only now.
I have seen a service run by root modify its config file which is in nix store long time ago. That's why I ask for a test.
LACT supports reading a configuration file from
/etc/lact/config.yaml
. This ishelpful to me as I prefer bootstrapping the LACT daemon automatically when I
nixos-install
my machine, of which I already know the hardware quirks.With this PR we write the config file if (and only if) the user fills out the
settings
but since wethis is an acceptable compromise. I haven't been able to test yet due to an ongoing power outage, but I'm pretty positive everything works as intended as changes. The submodule is grafted from my personal LACT module that I have been running for a while.
Things done
passthru.tests
.nixpkgs-review
on this PR. See nixpkgs-review usage../result/bin/
.Add a 👍 reaction to pull requests you find important.