forked from kalipso/infrastructure
[doc] add doc package
this can be used for hosting later on
This commit is contained in:
19
outputs.nix
19
outputs.nix
@@ -18,6 +18,25 @@ in (utils.lib.eachSystem (builtins.filter filter_system utils.lib.defaultSystems
|
||||
devShells.default = pkgs.callPackage ./shell.nix {
|
||||
inherit (sops-nix.packages."${pkgs.system}") sops-import-keys-hook ssh-to-pgp sops-init-gpg-key;
|
||||
};
|
||||
|
||||
packages = {
|
||||
docs = pkgs.stdenv.mkDerivation {
|
||||
name = "malobeo-docs";
|
||||
phases = [ "buildPhase" ];
|
||||
buildInputs = [ pkgs.mdbook ];
|
||||
|
||||
inputs = pkgs.lib.sourceFilesBySuffices ./doc/. [ ".md" ".toml" ];
|
||||
|
||||
buildPhase = ''
|
||||
dest=$out/share/doc
|
||||
mkdir -p $dest
|
||||
cp -r --no-preserve=all $inputs/* ./
|
||||
mdbook build
|
||||
ls
|
||||
cp -r ./book/* $dest
|
||||
'';
|
||||
};
|
||||
};
|
||||
})) // rec {
|
||||
nixosConfigurations = import ./machines/configuration.nix (inputs // {
|
||||
inherit inputs;
|
||||
|
||||
Reference in New Issue
Block a user