Summary Files Commits Branches @commit @diff @stats
path: root / autoconfig.nix
diff options
context:
space:
mode:
1 files changed, 5 insertions, 3 deletions
-rw-r--r--autoconfig.nix8
diff --git a/autoconfig.nix b/autoconfig.nix
index 7434a79..7534315 100644
--- a/autoconfig.nix
+++ b/autoconfig.nix
@@ -9,12 +9,14 @@ in {
let
inherit (import ./machines/${dir}/sysidentity.nix) sysidentity;
+ modules-dir = ./modules + ("/" + (if sysidentity ? "modules-subpath" then sysidentity.modules-subpath else "personal"));
+
package-modules =
let
listget = attrname:
if sysidentity ? ${attrname}
then map
- (v: ./modules + ("/" + v + (if lib.hasSuffix ".nix" v then "" else ".nix")))
+ (v: modules-dir + ("/" + v + (if lib.hasSuffix ".nix" v then "" else ".nix")))
sysidentity.${attrname}
else [];
droplist = listget "drop";
@@ -28,8 +30,8 @@ in {
if startsempty
then listget "have"
else lib.mapAttrsToList
- (name: _: ./modules + ("/" + name))
- (lib.filterAttrs (_: type: type == "regular") (builtins.readDir ./modules));
+ (name: _: modules-dir + ("/" + name))
+ (lib.filterAttrs (_: type: type == "regular") (builtins.readDir modules-dir));
in
(lib.subtractLists droplist modulelist) ++ havelist;