1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 11:39:46 +01:00

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 { sharedModules = mkOption {
type = with types; listOf (oneOf [ attrs (functionTo attrs) path ]); type = with types;
listOf (anything // {
inherit (submodule { }) check;
description = "Home Manager modules";
});
default = [ ]; default = [ ];
example = literalExample "[ { home.packages = [ nixpkgs-fmt ]; } ]"; example = literalExample "[ { home.packages = [ nixpkgs-fmt ]; } ]";
description = '' description = ''

View file

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