about summary refs log tree commit diff
path: root/users/grfn/system/home/default.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-04-19T22·09+0200
committertazjin <mail@tazj.in>2021-04-20T10·43+0000
commitb75dd136cbfccdd27dd836eea92aeda5569699fd (patch)
tree62af9ba36783d017ee1d447bbccef9da4e6d387f /users/grfn/system/home/default.nix
parent5f19e8e6a73f7d76fa4bb62036891e824b64b515 (diff)
refactor(grfn): Stop importing nixpkgs a bunch of times r/2528
Once is enough!

<grfn> https://tazj.in/blobs/touch-garbage.jpg

Change-Id: I68f66669e82d35a71752638450fa4b820e137172
Signed-Off-By: Florian Klink <flokli@flokli.de>
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3048
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'users/grfn/system/home/default.nix')
-rw-r--r--users/grfn/system/home/default.nix13
1 files changed, 8 insertions, 5 deletions
diff --git a/users/grfn/system/home/default.nix b/users/grfn/system/home/default.nix
index 1efba3f3c1e5..6221df95c3d3 100644
--- a/users/grfn/system/home/default.nix
+++ b/users/grfn/system/home/default.nix
@@ -5,13 +5,16 @@ with lib;
 rec {
   home = confPath: (import "${pkgs.home-manager.src}/modules" {
     inherit pkgs;
-    configuration = { config, lib, ... }: {
-      imports = [confPath];
-
-      _module.args.pkgs = mkForce
-        (import pkgs.path (filterAttrs (n: v: v != null) config.nixpkgs));
 
+    configuration = { config, lib, ... }: {
+      imports = [ confPath ];
       lib.depot = depot;
+
+      # home-manager exposes no API to override the package set that
+      # is used, unless called from the NixOS module.
+      #
+      # To get around it, the module argument is overridden here.
+      _module.args.pkgs = mkForce pkgs;
     };
   });