summaryrefslogtreecommitdiff
path: root/modules/flake-parts
diff options
context:
space:
mode:
Diffstat (limited to 'modules/flake-parts')
-rw-r--r--modules/flake-parts/devenv.nix23
-rw-r--r--modules/flake-parts/personal.nix3
2 files changed, 26 insertions, 0 deletions
diff --git a/modules/flake-parts/devenv.nix b/modules/flake-parts/devenv.nix
new file mode 100644
index 0000000..bdc40b1
--- /dev/null
+++ b/modules/flake-parts/devenv.nix
@@ -0,0 +1,23 @@
+devenvModules: {
+ flake-parts-lib,
+ lib,
+ inputs,
+ ...
+}: {
+ imports = [inputs.devenv.flakeModule];
+
+ options.perSystem = flake-parts-lib.mkPerSystemOption {
+ options.devenv.shells = lib.mkOption {
+ type = with lib.types;
+ lazyAttrsOf (submoduleWith {
+ modules = builtins.attrValues devenvModules;
+ shorthandOnlyDefinesConfig = null;
+ });
+ };
+ };
+
+ # the extra parameter before the module make this module behave like an
+ # anonymous module, so we need to manually identify the file, for better
+ # error messages, docs, and deduplication.
+ _file = __curPos.file;
+}
diff --git a/modules/flake-parts/personal.nix b/modules/flake-parts/personal.nix
new file mode 100644
index 0000000..370e176
--- /dev/null
+++ b/modules/flake-parts/personal.nix
@@ -0,0 +1,3 @@
+{
+ systems = ["x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
+}