Generate docs (#1)

* feat: Reorganize code

* feat: Generate docs as mdbook

* feat: Add deploy github action

* fix: formatting
This commit is contained in:
Jalil David Salamé Messina 2024-01-14 18:58:08 +01:00 committed by GitHub
parent ca6bf00ad6
commit 63034a2af9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 144 additions and 70 deletions

View file

@ -15,22 +15,25 @@
# Flake outputs that other flakes can use
outputs = { flake-schemas, nixpkgs, stylix, ... }:
let
inherit (nixpkgs) lib;
# Helpers for producing system-specific outputs
supportedSystems = [ "x86_64-linux" "aarch64-linux" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { pkgs = import nixpkgs { inherit system; }; });
# Module documentation
doc = forEachSupportedSystem ({ pkgs }: { doc = import ./docs { inherit pkgs lib; }; });
in
{
# Schemas tell Nix about the structure of your flake's outputs
schemas = flake-schemas.schemas;
packages = doc;
# Nix files formatter (run `nix fmt`)
formatter = forEachSupportedSystem ({ pkgs }: pkgs.nixpkgs-fmt);
nixosModules = rec {
default = nixosModule;
nixosModule = import ./configuration { inherit stylix; };
nixosModule = import ./module { inherit stylix; };
};
};
}