From fa5dd946de6b2cb6c01ab6bbff31b2f08e0b676d Mon Sep 17 00:00:00 2001 From: Asmir A Date: Wed, 15 Nov 2023 13:21:38 +0100 Subject: [PATCH] flake: add testing target with localhost as url --- flake.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 8d7d1ec..2b7e68d 100644 --- a/flake.nix +++ b/flake.nix @@ -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]; }; }); };