flake: add testing target with localhost as url
This commit is contained in:
parent
b15b3c9ebf
commit
fa5dd946de
15
flake.nix
15
flake.nix
@ -13,12 +13,12 @@
|
|||||||
supportedSystems = ["x86_64-linux" "aarch64-linux"];
|
supportedSystems = ["x86_64-linux" "aarch64-linux"];
|
||||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
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";
|
name = "project-cloud";
|
||||||
theme = theme_anemone;
|
theme = theme_anemone;
|
||||||
in {
|
package = system: url:
|
||||||
packages = forAllSystems (system: {
|
pkgs.${system}.stdenv.mkDerivation {
|
||||||
default = pkgs.${system}.stdenv.mkDerivation {
|
|
||||||
inherit name;
|
inherit name;
|
||||||
nativeBuildInputs = with pkgs.${system}; [zola];
|
nativeBuildInputs = with pkgs.${system}; [zola];
|
||||||
|
|
||||||
@ -35,11 +35,16 @@
|
|||||||
cp -r public/ $out/
|
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: {
|
devShells = forAllSystems (system: {
|
||||||
default = pkgs.${system}.mkShellNoCC {
|
default = pkgs.${system}.mkShellNoCC {
|
||||||
packages = with pkgs.${system}; [zola];
|
packages = with pkgs.${system}; [zola caddy];
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user