about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-08-06 13:21:59 -0700
committerFranck Cuny <franck@fcuny.net>2022-08-06 13:24:43 -0700
commitb308e7191e51c576188eb362a049c9de1ed03d6e (patch)
treee221dcafb46b2af4f64a58832289fda42da092ba
parentfix(tools): add gerrit-hook to the list of tools (diff)
downloadworld-b308e7191e51c576188eb362a049c9de1ed03d6e.tar.gz
ref(flake): tools and users packages are managed the same way
Configure the way we import these packages the same way, that way it's
consistent and easy to use.

Change-Id: I0e218f8fe9dd4cd2045bfee11c80de84ff769fe1
Reviewed-on: https://cl.fcuny.net/c/world/+/703
Tested-by: CI
Reviewed-by: Franck Cuny <franck@fcuny.net>
-rw-r--r--flake.nix6
-rw-r--r--users/fcuny/default.nix9
2 files changed, 10 insertions, 5 deletions
diff --git a/flake.nix b/flake.nix
index 8afc3c2..6e48370 100644
--- a/flake.nix
+++ b/flake.nix
@@ -61,11 +61,7 @@
 
             tools = import ./tools { inherit pkgs; };
 
-            users.fcuny = {
-              blog = import ./users/fcuny/blog { inherit pkgs; };
-              notes = import ./users/fcuny/notes { inherit pkgs; };
-              resume = import ./users/fcuny/resume { inherit pkgs; };
-            };
+            users.fcuny = import ./users/fcuny { inherit pkgs; };
           };
 
           checks = {
diff --git a/users/fcuny/default.nix b/users/fcuny/default.nix
new file mode 100644
index 0000000..f5b0914
--- /dev/null
+++ b/users/fcuny/default.nix
@@ -0,0 +1,9 @@
+{ pkgs }:
+
+pkgs.lib.makeScope pkgs.newScope (pkgs: {
+  resume = pkgs.callPackage ./resume { };
+
+  blog = pkgs.callPackage ./blog { };
+
+  notes = pkgs.callPackage ./notes { };
+})