Skip to content

Conversation

NotAShelf
Copy link
Member

@NotAShelf NotAShelf commented Jul 23, 2025

LACT supports reading a configuration file from /etc/lact/config.yaml. This is
helpful 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 we

  1. provide a warning in the description
  2. make settings opt-in

this 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

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Jul 23, 2025
@nixpkgs-ci nixpkgs-ci bot added the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Jul 23, 2025
@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Jul 26, 2025
@JohnRTitor JohnRTitor requested a review from jian-lin August 16, 2025 20:09
@JohnRTitor
Copy link
Member

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 427876

Logs: https://github.com/JohnRTitor/nixpkgs-review-gha/actions/runs/17051855120


x86_64-linux

✅ 1 test built:
  • nixosTests.lact

Copy link
Member

@JohnRTitor JohnRTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JohnRTitor JohnRTitor merged commit d0dd9e1 into NixOS:master Aug 18, 2025
25 of 28 checks passed

::: {.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.
Copy link
Contributor

@jian-lin jian-lin Aug 19, 2025

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?

Copy link
Member

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.

Copy link
Contributor

@jian-lin jian-lin Aug 19, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants