nixos/nix-darwin: switch sharedModules type to anything with custom check (#1880)

functionTo tries to evaluate functions too quickly and prevents modules
from accessing pkgs argument. fixes #1878.

Co-authored-by: Pacman99 <pachum99@gmail.com>
This commit is contained in:
Pacman99 2021-03-25 19:01:16 -07:00 committed by GitHub
parent ddcd476603
commit fedfd430f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -68,7 +68,11 @@ in
};
sharedModules = mkOption {
type = with types; listOf (oneOf [ attrs (functionTo attrs) path ]);
type = with types;
listOf (anything // {
inherit (submodule { }) check;
description = "Home Manager modules";
});
default = [ ];
example = literalExample "[ { home.packages = [ nixpkgs-fmt ]; } ]";
description = ''

View file

@ -75,7 +75,11 @@ in {
};
sharedModules = mkOption {
type = with types; listOf (oneOf [ attrs (functionTo attrs) path ]);
type = with types;
listOf (anything // {
inherit (submodule { }) check;
description = "Home Manager modules";
});
default = [ ];
example = literalExample "[ { home.packages = [ nixpkgs-fmt ]; } ]";
description = ''