flake: add testing target with localhost as url

This commit is contained in:
Asmir A 2023-11-15 13:21:38 +01:00
parent b15b3c9ebf
commit fa5dd946de
Signed by: asmir
GPG Key ID: 020C42B7A9ABA3E2

View File

@ -13,12 +13,12 @@
supportedSystems = ["x86_64-linux" "aarch64-linux"];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
url = "https://project-cloud.net";
url_deploy = "https://project-cloud.net";
url_local = "http://localhost:8080";
name = "project-cloud";
theme = theme_anemone;
in {
packages = forAllSystems (system: {
default = pkgs.${system}.stdenv.mkDerivation {
package = system: url:
pkgs.${system}.stdenv.mkDerivation {
inherit name;
nativeBuildInputs = with pkgs.${system}; [zola];
@ -35,11 +35,16 @@
cp -r public/ $out/
'';
};
in {
packages = forAllSystems (system: rec {
project-cloud = package system url_deploy;
test = package system url_local;
default = project-cloud;
});
devShells = forAllSystems (system: {
default = pkgs.${system}.mkShellNoCC {
packages = with pkgs.${system}; [zola];
packages = with pkgs.${system}; [zola caddy];
};
});
};