diff --git a/flake.nix b/flake.nix index 3862525..307a812 100644 --- a/flake.nix +++ b/flake.nix @@ -70,7 +70,7 @@ outputs = inputs@{ self, nixpkgs, nixpkgs-small, nixpkgs-unstable, flake-parts, colmena, ... }: flake-parts.lib.mkFlake { inherit inputs; } { - imports = [ ]; + imports = [ ./flake ]; systems = [ "x86_64-linux" "aarch64-linux" ]; diff --git a/flake/colmena.nix b/flake/colmena.nix new file mode 100644 index 0000000..1679e17 --- /dev/null +++ b/flake/colmena.nix @@ -0,0 +1,19 @@ +# https://git.lix.systems/the-distro/infra/src/commit/fbb23bf517206175764f154ddfd304b9ec501f87/colmena.nix +{ lib, ... }: { + options.flake.colmena = lib.mkOption { + type = lib.types.submodule { + freeformType = lib.types.attrsOf (lib.mkOptionType { + name = "NixOS module"; + description = "module containing NixOS options and/or config"; + descriptionClass = "noun"; + check = value: builtins.isAttrs value || builtins.isFunction value || builtins.isPath value; + merge = loc: defs: { + imports = map (def: def.value) defs; + }; + }); + options.meta = lib.mkOption { + type = lib.types.attrs; + }; + }; + }; +} diff --git a/flake/default.nix b/flake/default.nix new file mode 100644 index 0000000..65b028d --- /dev/null +++ b/flake/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./colmena.nix + ]; +}