nixos: replace types.anything with submodule type (#2396)

As discussed in this issue:
https://github.com/NixOS/nixpkgs/issues/140879
`types.anything` was never meant to be used for arbitrary modules.

Co-authored-by: Silvan Mosberger <github@infinisil.com>
This commit is contained in:
Bastien Rivière 2021-10-22 23:52:19 +02:00 committed by GitHub
parent cfe82d9f44
commit 8278c14f5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -70,8 +70,11 @@ in
sharedModules = mkOption {
type = with types;
listOf (anything // {
# TODO: use types.raw once this PR is merged: https://github.com/NixOS/nixpkgs/pull/132448
listOf (mkOptionType {
name = "submodule";
inherit (submodule { }) check;
merge = lib.options.mergeOneOption;
description = "Home Manager modules";
});
default = [ ];

View File

@ -81,8 +81,11 @@ in {
sharedModules = mkOption {
type = with types;
listOf (anything // {
# TODO: use types.raw once this PR is merged: https://github.com/NixOS/nixpkgs/pull/132448
listOf (mkOptionType {
name = "submodule";
inherit (submodule { }) check;
merge = lib.options.mergeOneOption;
description = "Home Manager modules";
});
default = [ ];