2023-12-30 18:27:23 +00:00
|
|
|
{
|
|
|
|
description = "A site in nix?";
|
|
|
|
|
2024-01-02 10:53:45 +00:00
|
|
|
inputs = {tix.url = "git+https://git.tristans.cloud/tristan/tix";};
|
2024-01-02 09:18:30 +00:00
|
|
|
|
2024-01-02 10:53:45 +00:00
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
tix,
|
|
|
|
}: let
|
|
|
|
system = "x86_64-linux";
|
|
|
|
pkgs = import nixpkgs {inherit system;};
|
|
|
|
nixite = import ./nixite/. {inherit pkgs;};
|
2024-01-04 05:07:45 +00:00
|
|
|
my-site = import ./testing/my-site.nix {inherit nixite;};
|
2024-01-02 10:53:45 +00:00
|
|
|
in
|
|
|
|
nixite
|
|
|
|
// {
|
2024-01-03 13:19:41 +00:00
|
|
|
formatter.${system} = pkgs.alejandra;
|
2023-12-31 09:28:28 +00:00
|
|
|
packages.${system} = {
|
2024-01-04 05:07:45 +00:00
|
|
|
raw = nixite.mkSite my-site;
|
2023-12-31 00:48:19 +00:00
|
|
|
|
2024-01-04 05:07:45 +00:00
|
|
|
default = nixite.serve my-site {};
|
|
|
|
|
|
|
|
dev = tix.watch {
|
|
|
|
setup = ''
|
|
|
|
nix build .#raw
|
|
|
|
${pkgs.caddy}/bin/caddy file-server --root result &
|
|
|
|
'';
|
|
|
|
cmd = ''
|
|
|
|
nix build .#raw
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
inherit (tix.packages.${system}) watch watchpipe results;
|
2023-12-30 18:27:23 +00:00
|
|
|
|
2024-01-02 09:18:30 +00:00
|
|
|
test = tix.run [
|
2024-01-01 06:33:57 +00:00
|
|
|
./testing/md.test.nix
|
2024-01-01 03:20:59 +00:00
|
|
|
./testing/html.test.nix
|
2024-01-01 06:33:57 +00:00
|
|
|
./testing/elems.test.nix
|
|
|
|
./testing/site.test.nix
|
2024-01-01 03:20:59 +00:00
|
|
|
./testing/style.test.nix
|
|
|
|
];
|
2024-01-02 04:01:19 +00:00
|
|
|
|
2023-12-31 09:28:28 +00:00
|
|
|
};
|
2023-12-30 18:27:23 +00:00
|
|
|
};
|
|
|
|
}
|