Commit Graph
237057 Commits
Author SHA1 Message Date
Silvan Mosberger 446d80d28d lib/tests: Add tests for freeform modules 2020-08-03 22:37:01 +02:00
Silvan Mosberger 2d45a62899 lib/types: Make submodules use the freeform type description
Submodules that have a freeform type set behave as if that was the type
of the option itself (for values that don't have an option). Since the
submodules options are shown as separate entries in the manual, it makes
sense to show the freeform type as the submodule type.
2020-08-03 22:37:01 +02:00
Silvan Mosberger 65e25deb06 lib/modules: Implement freeform modules
For programs that have a lot of (Nix-representable) configuration options,
a simple way to represent this in a NixOS module is to declare an
option of a type like `attrsOf str`, representing a key-value mapping
which then gets generated into a config file. However with such a type,
there's no way to add type checking for only some key values.

On the other end of the spectrum, one can declare a single separate
option for every key value that the program supports, ending up with a module
with potentially 100s of options. This has the benefit that every value
gets type checked, catching mistakes at evaluation time already. However
the disadvantage is that the module becomes big, becomes coupled to the
program version and takes a lot of effort to write and maintain.

Previously there was a middle ground between these two
extremes: Declare an option of a type like `attrsOf str`, but declare
additional separate options for the values you wish to have type
checked, and assign their values to the `attrsOf str` option. While this
works decently, it has the problem of duplicated options, since now both
the additional options and the `attrsOf str` option can be used to set a
key value. This leads to confusion about what should happen if both are
set, which defaults should apply, and more.

Now with this change, a middle ground becomes available that solves above
problems: The module system now supports setting a freeform type, which
gets used for all definitions that don't have an associated option. This
means that you can now declare all options you wish to have type
checked, while for the rest a freeform type like `attrsOf str` can be
used.
2020-08-03 22:37:00 +02:00
Silvan Mosberger fd75dc8765 lib/modules: Internally collect all unmatched definitions
This fundamentally changes how the module evaluation internally
handles definitions without an associated option.

Previously the values of these definitions were discarded and only
the names were propagated. This was fine because that's all that's
needed for optionally checking whether all definitions have an
associated option with _module.check.

However with the upcoming change of supporting freeform modules,
we *do* need the values of these.

With this change, the module evaluation cleanly separates definitions
that match an option, and ones that do not.
2020-08-03 22:37:00 +02:00
Silvan Mosberger b02a3d7b08 lib/modules: Scope module evaluation variables more tightly
This is a purely cosmetic change so it's easier to see dependencies
between variables.
2020-08-03 22:37:00 +02:00
Tim Steinbach b3f869febb linux: 5.7.11 -> 5.7.12 2020-08-03 16:35:16 -04:00
Tim Steinbach 60773afea2 linux: 5.4.54 -> 5.4.55 2020-08-03 16:35:15 -04:00
Tim Steinbach cb73bea24c linux: 4.9.231 -> 4.9.232 2020-08-03 16:35:15 -04:00
Tim Steinbach fd603b5afc linux: 4.4.231 -> 4.4.232 2020-08-03 16:35:15 -04:00
Tim Steinbach 5b88a328df linux: 4.19.135 -> 4.19.136 2020-08-03 16:35:15 -04:00
Tim Steinbach b02541c37b linux: 4.14.190 -> 4.14.191 2020-08-03 16:35:14 -04:00
Silvan MosbergerandGitHub 396c16113e Merge pull request #91948 from CheariX/joplin-desktop-1.0.224
joplin-desktop: 1.0.216 -> 1.0.233
2020-08-03 22:13:22 +02:00
Ryan MulliganandGitHub 4162c69b3c Merge pull request #92468 from petabyteboy/jitsi-meet
nixos/jitsi-meet: init
2020-08-03 12:43:37 -07:00
Daniël de KokandGitHub aae6b4ea12 Merge pull request #94596 from r-ryantm/auto-update/imagemagick
imagemagick7: 7.0.10-19 -> 7.0.10-25
2020-08-03 20:44:34 +02:00
Maximilian BoschandGitHub 2ae62ef72f Merge pull request #94611 from Ma27/rel-pkgs-error-msg
nixos/manual: improve error message for invalid values in `relatedPackages'
2020-08-03 20:17:46 +02:00
Maximilian BoschandGitHub 869bf4f76c Merge pull request #94327 from r-ryantm/auto-update/thc-hydra
thc-hydra: 9.0 -> 9.1
2020-08-03 20:14:04 +02:00
Jan Tojnar ce6e35d1f5 bustle: fix build
Patches are part of Bustle 0.8.0.
2020-08-03 19:47:37 +02:00
Jacek GalowiczandGitHub 319d7ec8d4 Merge pull request #93413 from liff/taskserver-python-test
nixosTests.taskserver: Port to python
2020-08-03 19:38:57 +02:00
R. RyanTMandJan Tojnar 35735ac930 fwupd: 1.4.4 -> 1.4.5 2020-08-03 19:34:54 +02:00
f4814nandGitHub 6e4d33a001 chromium: Add missing dependency on coreutils (#94578)
The script that runs chromium calls tr from coreutils - however
it just assumed that coreutils are in PATH.

With missing coreutils chromium did still launch (at least with
d433839007 applied) but emitted
`line 15: tr: command not found` error messages.
2020-08-03 17:58:41 +02:00
Martin WeineltandGitHub d1f59cf7b8 Merge pull request #94583 from mweinelt/zigbee2mqtt
zigbee2mqtt: 1.14.1 -> 1.14.2
2020-08-03 17:50:28 +02:00
Maximilian Bosch 04a10b3355 nixos/tests/systemd-networkd-vrf: add comment about trailing whitespaces in test script
For further context please read the discussion in https://github.com/NixOS/nixpkgs/pull/94607#issuecomment-668070029
2020-08-03 17:43:56 +02:00
Martin WeineltandGitHub f2848673ce Merge pull request #94575 from zowoq/ecc-actions
.github/workflows/editorconfig.yml: separate fetch and check steps
2020-08-03 17:03:50 +02:00
Martin WeineltandGitHub df51033330 Merge pull request #94475 from mweinelt/hass
homeassistant: 0.113.0 -> 0.113.3
2020-08-03 16:59:52 +02:00
Maximilian BoschandGitHub dd49aa581b Merge pull request #94580 from r-ryantm/auto-update/bspwm
bspwm: 0.9.9 -> 0.9.10
2020-08-03 16:58:44 +02:00
zowoq 1ccda2fb05 .editorconfig: add nixos/tests/systemd-networkd-vrf 2020-08-04 00:56:39 +10:00
Maximilian BoschandGitHub 76f2e271a2 Merge pull request #94600 from liff/patch-1
nixos/manual: Fix reference to send_key
2020-08-03 16:51:30 +02:00
Maximilian Bosch 5bd1fb2884 nixos/tests/systemd-networkd-vrf: fix test
Broken while fixing some `.editorconfig`-definitions[1], however this
test explicitly relies on the output of `iproute2`.

[1] 8ae7f8c359
2020-08-03 16:47:40 +02:00
Maximilian Bosch 6d19c04416 nixos/manual: improve error message for invalid values in `relatedPackages'
As reported in NixOS discourse[1], tracking down invalid values in
`relatedPackages'[2] (i.e. list-items that don't exist in `pkgs`) is
fairly hard as the message "Invalid package attribute path `foobar'"
is quite unhelpful and the trace doesn't point to the source of the
problem either.

This patch improves the error message by mentioning that the issue is an
invalid `relatedPackages`-declaration in $optionName.

[1] https://discourse.nixos.org/t/invalid-package-attribute-path-nextcloud19/8403/9
[2] https://nixos.org/nixpkgs/manual/#sec-functions-library-options
2020-08-03 16:37:59 +02:00
zowoq c1fce8f814 .github/workflows/editorconfig.yml: separate fetch and check steps 2020-08-04 00:35:50 +10:00
zowoq 8ae7f8c359 nixos/tests/*: editorconfig fixes 2020-08-04 00:23:54 +10:00
zowoq 2b5659c700 nixos/maintainers/*: editorconfig fixes 2020-08-04 00:23:54 +10:00
zowoq 25d7880f17 nixos/lib/*: editorconfig fixes 2020-08-04 00:23:54 +10:00
Martin Weinelt b41b902a1c nixos/zigbee2mqtt: add test to all-tests.nix 2020-08-03 16:17:49 +02:00
Martin Weinelt 87b8364851 zigbee2mqtt: add passthru test 2020-08-03 16:17:48 +02:00
Martin Weinelt 98c2bd1b13 zigbee2mqtt: 1.14.1 -> 1.14.2 2020-08-03 16:17:48 +02:00
Martin Weinelt 9d284f3548 zigbee2mqtt: upgrade deps.sh to update.sh 2020-08-03 16:17:48 +02:00
Martin Weinelt 87d4e1230b home-assistant: add patch to fix flapping logging test 2020-08-03 16:16:25 +02:00
Marek MahutandGitHub 4181ae25bf Merge pull request #94166 from 1000101/bitcoind
release-notes/rl-2009: amend bitcoind incompatibility
2020-08-03 15:56:56 +02:00
Peter HoegandGitHub b6c3c725c6 Merge pull request #94278 from r-ryantm/auto-update/kwin-tiling
kwin-tiling: 2.2 -> 2.4
2020-08-03 20:26:45 +08:00
Aaron AndersenandGitHub 34298f0673 Merge pull request #94551 from StijnDW/dokuwiki
nixos/dokuwiki: fix https redirect
2020-08-03 08:17:37 -04:00
Mario RodasandGitHub e347b4bbb3 Merge pull request #94581 from xrelkd/update/eksctl
eksctl: 0.24.0 -> 0.25.0
2020-08-03 07:04:58 -05:00
Mario RodasandGitHub a6be178a02 Merge pull request #94601 from r-ryantm/auto-update/groonga
groonga: 10.0.4 -> 10.0.5
2020-08-03 07:04:02 -05:00
zowoq bcf63fed7c .editorconfig: add nixos/ircd-hybrid, dotnetenv/Wrapper 2020-08-03 21:52:52 +10:00
Christian Mainka 4ba054ee37 joplin-desktop: 227 -> 233 2020-08-03 12:35:49 +02:00
R. RyanTMandzowoq 20083fbd61 groonga: 10.0.4 -> 10.0.5 2020-08-03 20:34:27 +10:00
Olli HeleniusandGitHub 446669cb5e nixos/manual: Fix reference to send_key 2020-08-03 13:16:24 +03:00
Lancelot SIXandGitHub 588940d405 Merge pull request #94570 from r-ryantm/auto-update/python2.7-autopep8
python27Packages.autopep8: 1.5.3 -> 1.5.4
2020-08-03 10:44:45 +01:00
Jörg ThalheimandGitHub c4ba980a27 Merge pull request #94593 from NixOS/dependabot/github_actions/technote-space/get-diff-action-v2.0.3 2020-08-03 10:30:47 +01:00
R. RyanTM b9d13c1819 imagemagick7: 7.0.10-19 -> 7.0.10-25 2020-08-03 08:34:51 +00:00