From 8278c14f5f8725e1b5936d6f54e63d4626aae98c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastien=20Rivi=C3=A8re?= Date: Fri, 22 Oct 2021 23:52:19 +0200 Subject: [PATCH] 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 --- nix-darwin/default.nix | 5 ++++- nixos/default.nix | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/nix-darwin/default.nix b/nix-darwin/default.nix index 6006c1fc..f400c9ce 100644 --- a/nix-darwin/default.nix +++ b/nix-darwin/default.nix @@ -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 = [ ]; diff --git a/nixos/default.nix b/nixos/default.nix index cca9d279..e971cdc8 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -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 = [ ];