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 { sharedModules = mkOption {
type = with types; 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; inherit (submodule { }) check;
merge = lib.options.mergeOneOption;
description = "Home Manager modules"; description = "Home Manager modules";
}); });
default = [ ]; default = [ ];

View file

@ -81,8 +81,11 @@ in {
sharedModules = mkOption { sharedModules = mkOption {
type = with types; 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; inherit (submodule { }) check;
merge = lib.options.mergeOneOption;
description = "Home Manager modules"; description = "Home Manager modules";
}); });
default = [ ]; default = [ ];