diff --git a/all-modules.nix b/all-modules.nix index a913858..104553c 100644 --- a/all-modules.nix +++ b/all-modules.nix @@ -7,6 +7,7 @@ ./modules/devShells.nix ./modules/flake.nix ./modules/legacyPackages.nix + ./modules/nixosConfigurations.nix ./modules/nixosModules.nix ./modules/overlay.nix ./modules/packages.nix diff --git a/modules/nixosConfigurations.nix b/modules/nixosConfigurations.nix new file mode 100644 index 0000000..6dee1bb --- /dev/null +++ b/modules/nixosConfigurations.nix @@ -0,0 +1,34 @@ +{ config, lib, flake-modules-core-lib, ... }: +let + inherit (lib) + mkOption + types + literalExpression + ; + inherit (flake-modules-core-lib) + mkSubmoduleOptions + ; +in +{ + options = { + flake = mkSubmoduleOptions { + nixosConfigurations = mkOption { + type = types.lazyAttrsOf types.raw; + default = { }; + description = '' + Instantiated NixOS configurations. + ''; + example = literalExpression '' + { + my-machine = inputs.nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./my-machine/nixos-configuration.nix + ]; + }; + } + ''; + }; + }; + }; +}