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.
- 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.
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:
nix-build ci -A fmt.check
This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).
This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).
Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).
If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
By enabling this module, the jlink system group is created and udev
rules from the libjaylink package are enabled. Read-/Write access is
granted to the members of the jlink group and to seat sessions.
Signed-off-by: Felix Singer <felixsinger@posteo.net>
By enabling this module, the ftdi system group is created and udev
rules from the libftdi package are enabled. Read-/Write access is
granted to the members of the ftdi group and to seat sessions.
Signed-off-by: Felix Singer <felixsinger@posteo.net>
passthru.function is not existent, instead use overrideAttrs which has
almost the intended functionality. It triggers a rebuild, which
_should_ be fine for this package.
Fixes the following warning when setting
`systemd.enableStrictShellChecks = true`:
> In /nix/store/a3mk99mgl10a4k3maxx361hdli5p2rip-unit-script-ensure-printers-start/bin/ensure-printers-start line 6:
> /nix/store/26fb46gwc5sbd045nj3dxw4zqpml359i-cups-2.4.11/bin/lpadmin -D 'virtual printer for cups-pdf instance pdf' -L '/var/spool/cups-pdf-pdf/users/${USER}' -m CUPS-PDF_opt.ppd -p pdf -v cups-pdf:/pdf -E
> ^-- SC2016 (info): Expressions don't expand in single quotes, use double quotes for that.