Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,27 @@ rec {
};
};

projects = make-projects raw-projects;

# TODO: remove after migrating to modules
# ===

raw-projects-new = import ./projects/default-module.nix {
inherit lib;
pkgs = pkgs // ngipkgs;
sources = {
inputs = sources;
modules = nixos-modules;
inherit examples;
};
};

# TODO: delete the file after migrating to modules
projects-new = make-projects raw-projects-new.config.projects;

# TODO:
# ===

project-models = import ./projects/models.nix { inherit lib pkgs sources; };

# we mainly care about the types being checked
Expand All @@ -176,7 +197,8 @@ rec {
pkgs.writeText "dummy" (lib.strings.toJSON project-metadata);

# TODO: find a better place for this
projects =
make-projects =
projects:
with lib;
let
nixosTest =
Expand Down Expand Up @@ -243,7 +265,7 @@ rec {
) ((empty-if-null project.nixos.tests or { }) // (filter-map (nixos.examples or { }) "tests"));
};
in
mapAttrs (name: project: hydrate project) raw-projects;
mapAttrs (name: project: hydrate project) projects;

shell = pkgs.mkShellNoCC {
packages = [
Expand Down
42 changes: 30 additions & 12 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,36 @@
in
rec {
packages = ngipkgs // {
overview = import ./overview {
inherit
lib
lib'
self
nixpkgs
system
;
pkgs = pkgs // ngipkgs;
projects = ngiProjects;
options = optionsDoc.optionsNix;
};
overview =
let
overview-new = import ./overview {
inherit
lib
lib'
self
nixpkgs
system
;
pkgs = pkgs // ngipkgs;
projects = classic.projects-new;
options = optionsDoc.optionsNix;
};
overview-old = import ./overview {
inherit
lib
lib'
self
nixpkgs
system
;
pkgs = pkgs // ngipkgs;
projects = ngiProjects;
options = optionsDoc.optionsNix;
};
in
# TODO: switch to overview-new
assert overview-old == overview-new;
overview-old;

options =
pkgs.runCommand "options.json"
Expand Down