Skip to content

Commit

Permalink
nix-darwin add sharedModules and extraSpecialArgs options
Browse files Browse the repository at this point in the history
  • Loading branch information
Pacman99 committed Feb 18, 2021
1 parent ef92510 commit 3d36a55
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions nix-darwin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let
specialArgs = {
lib = extendedLib;
darwinConfig = config;
};
} // cfg.extraSpecialArgs;
modules = [
({ name, ... }: {
imports = import ../modules/modules.nix {
Expand All @@ -29,7 +29,7 @@ let
home.homeDirectory = config.users.users.${name}.home;
};
})
];
] ++ cfg.sharedModules;
};

in
Expand Down Expand Up @@ -58,6 +58,24 @@ in
'';
};

extraSpecialArgs = mkOption {
type = types.attrs;
default = { };
example = literalExample "{ modulesPath = ../modules; }";
description = ''
Extra <literal>specialArgs</literal> passed to Home Manager.
'';
};

sharedModules = mkOption {
type = with types; listOf (oneOf [ attrs (functionTo attrs) path ]);
default = [ ];
example = literalExample "[ { home.packages = [ nixpkgs-fmt ]; } ]";
description = ''
Extra modules added to all users.
'';
};

verbose = mkEnableOption "verbose output on activation";

users = mkOption {
Expand Down

0 comments on commit 3d36a55

Please sign in to comment.