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 ++++++++++-- machines/juno/sysidentity.nix | 1 + machines/minerva/sysidentity.nix | 1 + machines/vesta/sysidentity.nix | 1 + 4 files changed, 13 insertions(+), 2 deletions(-) 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 diff --git a/machines/juno/sysidentity.nix b/machines/juno/sysidentity.nix index 5fd1a76..35aed93 100644 --- a/machines/juno/sysidentity.nix +++ b/machines/juno/sysidentity.nix @@ -1,6 +1,7 @@ groups: { name = "juno"; arch = "x86_64-linux"; + kind = "personal"; include = groups.laptop; } diff --git a/machines/minerva/sysidentity.nix b/machines/minerva/sysidentity.nix index 4e59f68..8d283ee 100644 --- a/machines/minerva/sysidentity.nix +++ b/machines/minerva/sysidentity.nix @@ -1,6 +1,7 @@ groups: { name = "minerva"; arch = "x86_64-linux"; + kind = "personal"; include = groups.laptop ++ [ "gui-powerful" ]; } diff --git a/machines/vesta/sysidentity.nix b/machines/vesta/sysidentity.nix index 1334d3a..36e9927 100644 --- a/machines/vesta/sysidentity.nix +++ b/machines/vesta/sysidentity.nix @@ -1,6 +1,7 @@ groups: { name = "vesta"; arch = "x86_64-linux"; + kind = "personal"; include = groups.desktop; } -- cgit v1.3.1-26-gb76a