From e69d90192823929a437e035605d1fd64b54c5877 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 8 Sep 2024 10:36:35 +0300 Subject: feat(autoconfig)!: Rework modules-dir to use a new sysidentity argument - kind --- autoconfig.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'autoconfig.nix') diff --git a/autoconfig.nix b/autoconfig.nix index f1f47c4..aae1315 100644 --- a/autoconfig.nix +++ b/autoconfig.nix @@ -7,10 +7,18 @@ in { lib.mapAttrs (dir: _: let + # sysidentity.nix is a file inside machines/name/, which is always in the form + # groups: # attrset which will be used in include and exclude + # { + # name = ""; # hostname of machine + # arch = ""; # architecture + # kind = ""; # name of subfolder inside ./modules + # include = []; # names of files inside ./modules/kind/ which to be included, by default only default.nix is + # exclude = []; # names of files inside ./modules/kind/ which to be excluded (from include) + # } sysidentity = (import ./machines/${dir}/sysidentity.nix) (import ./module-groups.nix); - # TODO: rework - modules-dir = ./modules + ("/" + (if sysidentity ? "modules-subpath" then sysidentity.modules-subpath else "personal")); + modules-dir = ./modules + ("/" + sysidentity."kind"); package-modules = let -- cgit v1.3.1-26-gb76a