diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 239816be..f6e31095 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -3,7 +3,7 @@ name: Release on: push: tags: - - 'v*' + - '*' jobs: release: @@ -15,8 +15,11 @@ jobs: - name: Process static files run: >- - nix build --print-out-paths --print-build-logs .#hakurei-static && - nix shell nixpkgs#gnutar nixpkgs#zstd --command tar -C result --zstd -cf hakurei.app-${{ github.ref_name }}.tar.zst . + nix build \ + --print-out-paths \ + --print-build-logs \ + --out-link hakurei.app-${{ github.ref_name }}.tar.zst \ + .#dist - name: Release uses: https://gitea.com/actions/release-action@main diff --git a/.gitea/workflows/static.yml b/.gitea/workflows/static.yml index 93c92092..ecab9d63 100644 --- a/.gitea/workflows/static.yml +++ b/.gitea/workflows/static.yml @@ -27,7 +27,7 @@ jobs: run: >- export HAKUREI_REV="$(git rev-parse --short HEAD)" && sed -i.old 's/version = /version = "0.0.0-'$HAKUREI_REV'"; # version = /' package.nix && - nix build --print-out-paths --print-build-logs .#hakurei-static && + nix build --print-out-paths --print-build-logs .#static && mv package.nix.old package.nix && echo "rev=$HAKUREI_REV" >> $GITHUB_OUTPUT diff --git a/flake.nix b/flake.nix index 0d0bc3f9..9f4b7b45 100644 --- a/flake.nix +++ b/flake.nix @@ -67,17 +67,25 @@ packages = forAllSystems ( system: let - inherit (self.packages.${system}) hakurei-static caddy-hakurei-static; + inherit (self.packages.${system}) static caddy; pkgs = nixpkgsFor.${system}; in { - default = caddy-hakurei-static; - hakurei-static = pkgs.callPackage ./package.nix { }; - caddy-hakurei-static = pkgs.writeShellScriptBin "caddy-hakurei-static" '' + default = caddy; + static = pkgs.callPackage ./package.nix { }; + dist = pkgs.runCommand "hakurei-static-${static.version}.tar.zst" { } '' + PATH="${pkgs.zstd}/bin:$PATH" \ + ${pkgs.gnutar}/bin/tar \ + -C '${static}' \ + --zstd \ + -cf \ + "$out" . + ''; + caddy = pkgs.writeShellScriptBin "caddy-hakurei-static" '' exec ${pkgs.caddy}/bin/caddy \ file-server \ -a -l ":49151" \ - -r ${hakurei-static} + -r ${static} ''; } ); diff --git a/package.nix b/package.nix index 7241de29..34c6fcbc 100644 --- a/package.nix +++ b/package.nix @@ -1,6 +1,6 @@ { - stdenvNoCC, - runCommandNoCC, + stdenv, + runCommand, util-linux, moreutils, parallel, @@ -15,7 +15,7 @@ python3, buildNpmPackage, }: -stdenvNoCC.mkDerivation rec { +stdenv.mkDerivation rec { pname = "hakurei.app"; version = "0.1.0"; @@ -41,7 +41,7 @@ stdenvNoCC.mkDerivation rec { nativeBuildInputs = [ util-linux - (runCommandNoCC "sponge" { } "mkdir -p $out/bin && ln -s ${moreutils}/bin/sponge $out/bin") + (runCommand "sponge" { } "mkdir -p $out/bin && ln -s ${moreutils}/bin/sponge $out/bin") parallel openssl libxml2 diff --git a/static/404.html b/static/404.html index f3de5a77..ce1d22dd 100644 --- a/static/404.html +++ b/static/404.html @@ -32,7 +32,7 @@

Page not found

The requested page does not exist. If you think this is a mistake, please - report an issue.

+ report an issue.

{% include "footer.html" %} diff --git a/static/humans.txt b/static/humans.txt index 713e4c6f..641cab96 100644 --- a/static/humans.txt +++ b/static/humans.txt @@ -55,6 +55,6 @@ Hakurei is a collaboratively developed open source project. -See the repositories at https://git.gensokyo.uk/security for more details. +See the repositories at https://git.gensokyo.uk/rosa for more details. -This website is developed in the https://git.gensokyo.uk/security/hakurei.app repository. +This website is developed in the https://git.gensokyo.uk/rosa/hakurei.app repository. diff --git a/static/index.html b/static/index.html index 6d907210..1ac36402 100644 --- a/static/index.html +++ b/static/index.html @@ -8,8 +8,8 @@ - - + + @@ -62,7 +62,7 @@

Hakurei is a security-focused Linux container runtime for running unmodified desktop applications, developed as a non-profit open source + href="https://git.gensokyo.uk/rosa/hakurei" target="_blank">open source project. It also implements planterette, an experimental self-contained Android-like package manager with modern security features.

@@ -81,9 +81,9 @@ sandbox.

Official releases are available via Gitea + href="https://git.gensokyo.uk/rosa/hakurei/releases" target="_blank">Gitea and documentation for the included NixOS module can be found - here.

diff --git a/static/install.html b/static/install.html index 34503bb5..18d857d6 100644 --- a/static/install.html +++ b/static/install.html @@ -36,9 +36,9 @@

Hakurei can be installed to almost any Linux-based operating system by running install.sh from a release tarball found here. + href="https://git.gensokyo.uk/rosa/hakurei/releases" target="_blank">here. With that said, the current easiest method for using Hakurei with desktop apps would be - via the companion NixOS module.

We strongly recommend using one of the official installation methods. Third party diff --git a/templates/footer.html b/templates/footer.html index bd32d1f3..7018c8d3 100644 --- a/templates/footer.html +++ b/templates/footer.html @@ -1,7 +1,7 @@