From ed23d606f190aa20e620063ab65e78caf613b67c Mon Sep 17 00:00:00 2001 From: seth Date: Wed, 28 Feb 2024 06:51:04 -0500 Subject: modules: reorganize standalone and system user handling --- modules/flake/configurations.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'modules/flake') 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"; -- cgit v1.2.3