2021-05-16 23:23:08 +03:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
htmlNix = {
|
|
|
|
url = "github:yusdacra/html.nix";
|
|
|
|
inputs.flakeUtils.follows = "flakeUtils";
|
2021-05-17 04:05:29 +03:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2021-05-16 23:23:08 +03:00
|
|
|
};
|
2022-04-10 07:20:52 +03:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2021-05-16 23:23:08 +03:00
|
|
|
flakeUtils.url = "github:numtide/flake-utils";
|
|
|
|
};
|
|
|
|
|
2022-07-30 14:30:02 +03:00
|
|
|
outputs = {
|
|
|
|
htmlNix,
|
|
|
|
flakeUtils,
|
|
|
|
nixpkgs,
|
|
|
|
...
|
|
|
|
} @ inputs:
|
2021-05-16 23:23:08 +03:00
|
|
|
with flakeUtils.lib;
|
2022-07-30 14:30:02 +03:00
|
|
|
eachDefaultSystem (system: let
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
2021-05-17 04:05:29 +03:00
|
|
|
|
2022-07-30 14:30:02 +03:00
|
|
|
inherit (builtins) readFile;
|
|
|
|
ssgLib = htmlNix.lib.${system}.pkgsLib;
|
|
|
|
htmlLib = htmlNix.lib;
|
|
|
|
|
|
|
|
site = local:
|
|
|
|
ssgLib.mkSiteFrom {
|
|
|
|
inherit local;
|
|
|
|
src = ./.;
|
|
|
|
templater = ctx:
|
|
|
|
htmlLib.templaters.basic
|
|
|
|
(
|
|
|
|
ctx
|
|
|
|
// {
|
|
|
|
indexContent = builtins.readFile ./main-content.html;
|
|
|
|
resources = {
|
|
|
|
"gaze-office.webp" = ./resources/GazeOfficeIcon.webp;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
};
|
|
|
|
in rec {
|
2021-05-16 23:23:08 +03:00
|
|
|
apps = {
|
|
|
|
website = mkApp {
|
2022-07-30 14:30:02 +03:00
|
|
|
drv = ssgLib.mkServeFromSite (site true);
|
2021-05-16 23:23:08 +03:00
|
|
|
name = "serve";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
packages = {
|
2022-07-30 14:30:02 +03:00
|
|
|
website = ssgLib.mkSitePath (site false);
|
2021-05-16 23:23:08 +03:00
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|