Commit graph

5 commits

Author SHA1 Message Date
Johannes Kirschbauer a593032e93
nixos/modules: fw-fanctrl use correct type in freeformType 2025-09-05 18:04:13 +02:00
dish 970dcca69c
treewide: Fix links in module documentation 2025-08-25 12:55:11 -04:00
Mirza Arnaut 15ad26705b nixos/hardware.fw-fanctrl: add package option and refactor using lib.attrsets.recursiveUpdate
Typically services have a `package` option, so it can be set externally
if users are running the stable version but want the package from
unstable, or devs want to test a package from their flake in production.
Really useful in many situations!

Also, the previous implementation was using `pkgs.runCommand` which is
discouraged due to
[IFD](https://nix.dev/manual/nix/2.26/language/import-from-derivation)
(import from derivation) leading to potential slowdowns during
evaluation. I opted for reading the json file and using
[lib.attrsets.recursiveUpdate](https://ryantm.github.io/nixpkgs/functions/library/attrsets/#function-library-lib.attrsets.recursiveUpdate)
to update the default values with the user provided ones.
2025-07-27 19:12:59 +02:00
0x4A6F bb46a07699
fw-fanctrl: set default strategies
- fixes #426282

- current implementation breaks generation of strategies,
  when strategies are not defined by user.

- minimal working config with `strategies.default = null`:
```nix
  hardware.fw-fanctrl = {
    enable = true;
    config.strategies = { };
  };
```

- User should be able to start the service, when only `hardware.fw-fanctrl.enable`
  is enabled.
2025-07-23 20:42:01 +02:00
Svenum cfe95170f1 nixos/fw-fanctrl: init 2025-07-13 18:22:47 +02:00