nixite/flake.nix

47 lines
1.1 KiB
Nix
Raw Normal View History

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;};
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} = {
raw = nixite.mkSite my-site;
2023-12-31 00:48:19 +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-04 22:37:43 +00:00
# ./testing/md.test.nix
./testing/html.test.nix
./testing/elems.test.nix
./testing/builder.test.nix
2024-01-01 06:33:57 +00:00
./testing/site.test.nix
2024-01-04 22:37:43 +00:00
./testing/style.test.nix
2024-01-01 03:20:59 +00:00
];
2023-12-31 09:28:28 +00:00
};
2023-12-30 18:27:23 +00:00
};
}