From efc795920b2ea1b157c321005336a0e8c0d6cd4e Mon Sep 17 00:00:00 2001 From: "Wael M. Nasreddine" Date: Wed, 20 Feb 2019 23:39:49 -0800 Subject: nix-darwin: support package install through user packages --- nix-darwin/default.nix | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'nix-darwin/default.nix') diff --git a/nix-darwin/default.nix b/nix-darwin/default.nix index b637d34b9a7..3e4bcb38d5f 100644 --- a/nix-darwin/default.nix +++ b/nix-darwin/default.nix @@ -11,6 +11,8 @@ let config = { submoduleSupport.enable = true; + submoduleSupport.externalPackageInstall = cfg.useUserPackages; + home.username = config.users.users.${name}.name; home.homeDirectory = config.users.users.${name}.home; }; @@ -20,12 +22,19 @@ in { options = { - home-manager.users = mkOption { - type = types.attrsOf hmModule; - default = {}; - description = '' - Per-user Home Manager configuration. + home-manager = { + useUserPackages = mkEnableOption '' + installation of user packages through the + option. ''; + + users = mkOption { + type = types.attrsOf hmModule; + default = {}; + description = '' + Per-user Home Manager configuration. + ''; + }; }; }; -- cgit v1.2.3