mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
nix-darwin: support package install through user packages
This commit is contained in:
parent
d3fd287efb
commit
efc795920b
1 changed files with 14 additions and 5 deletions
|
@ -11,6 +11,8 @@ let
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
submoduleSupport.enable = true;
|
submoduleSupport.enable = true;
|
||||||
|
submoduleSupport.externalPackageInstall = cfg.useUserPackages;
|
||||||
|
|
||||||
home.username = config.users.users.${name}.name;
|
home.username = config.users.users.${name}.name;
|
||||||
home.homeDirectory = config.users.users.${name}.home;
|
home.homeDirectory = config.users.users.${name}.home;
|
||||||
};
|
};
|
||||||
|
@ -20,7 +22,13 @@ in
|
||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
home-manager.users = mkOption {
|
home-manager = {
|
||||||
|
useUserPackages = mkEnableOption ''
|
||||||
|
installation of user packages through the
|
||||||
|
<option>users.users.<name?>.packages</option> option.
|
||||||
|
'';
|
||||||
|
|
||||||
|
users = mkOption {
|
||||||
type = types.attrsOf hmModule;
|
type = types.attrsOf hmModule;
|
||||||
default = {};
|
default = {};
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -28,6 +36,7 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf (cfg.users != {}) {
|
config = mkIf (cfg.users != {}) {
|
||||||
system.activationScripts.postActivation.text =
|
system.activationScripts.postActivation.text =
|
||||||
|
|
Loading…
Reference in a new issue