Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commite69d90192823929a437e035605d1fd64b54c5877 (patch)
Author
 Syndamia <kamen@syndamia.com>
2024-09-08 10:36:35 +0300
Committer
 Syndamia <kamen@syndamia.com>
2024-09-08 10:36:35 +0300
Files275b8f530e3169f727db07362ef04ebb0058d8ca
nix-e69d90192823929a437e035605d1fd64b54c5877.tar
nix-e69d90192823929a437e035605d1fd64b54c5877.tar.gz
nix-e69d90192823929a437e035605d1fd64b54c5877.zip
Parent2869a3893a8aa5d9ef6846ec09a40180fe5cbcf9 (diff)
feat(autoconfig)!: Rework modules-dir to use a new sysidentity argument - kind
4 files changed, 13 insertions, 2 deletions
-rw-r--r--autoconfig.nix12
-rw-r--r--machines/juno/sysidentity.nix1
-rw-r--r--machines/minerva/sysidentity.nix1
-rw-r--r--machines/vesta/sysidentity.nix1
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;
}