summaryrefslogtreecommitdiff
path: root/modules/flake
diff options
context:
space:
mode:
authorseth <[email protected]>2024-02-28 06:51:04 -0500
committerseth <[email protected]>2024-02-28 06:51:04 -0500
commited23d606f190aa20e620063ab65e78caf613b67c (patch)
tree00a30702876104ae07a9544ae38ff55ed92f0126 /modules/flake
parent62621080f9f97f5dffa889daf1dbc7257ba2cda7 (diff)
modules: reorganize standalone and system user handling
Diffstat (limited to 'modules/flake')
-rw-r--r--modules/flake/configurations.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/flake/configurations.nix b/modules/flake/configurations.nix
index d9406db..7b745fc 100644
--- a/modules/flake/configurations.nix
+++ b/modules/flake/configurations.nix
@@ -1,11 +1,15 @@
{
config,
lib,
+ moduleLocation,
+ flake-parts-lib,
withSystem,
inputs,
self,
...
}: let
+ inherit (flake-parts-lib) mkSubmoduleOptions;
+
inherit
(lib)
attrValues
@@ -150,6 +154,17 @@ in {
];
options = {
+ flake = mkSubmoduleOptions {
+ darwinModules = mkOption {
+ type = types.lazyAttrsOf types.unspecified;
+ default = {};
+ apply = mapAttrs (name: value: {
+ _file = "${toString moduleLocation}#darwinModules.${name}";
+ imports = [value];
+ });
+ };
+ };
+
nixosConfigurations = mkSystemOptions "nixos";
darwinConfigurations = mkSystemOptions "darwin";