Skip to content

[Techstack-beta] Not being built as a Nix build output #1296

Closed

Description

@samueldr

Not being able to handle the build of the website with a correct Nix build output gives mixed messages about Nix and its ecosystem, imo.

I was surprised earlier when testing the site and trying to check something that nix-build (or nix build) won't build the site anymore.


Refs:

Previous implementation (calling nix build):

New implementation (running non-Nix package management outside of a Nix build):

  • - name: "Build"
    run: |
    nix develop --accept-flake-config --command npm install
    nix develop --accept-flake-config --command npm run build
    mkdir build
    cp -RL ./dist/* ./build/

Activity

  1. garbas commented on Mar 4, 2024

    @garbas
    Member

    Yes, this was decided for now. It might even stay this way. We'll evaluate this after the migration is complete and after some time of using the website.

  2. thilobillerbeck commented on Mar 13, 2024

    @thilobillerbeck
    Member

    Currently there is one dependency which requires network connectivity to fetch icons at build time, but this will be replaced shortly. Then a nix build would be possible.

    Unfortunately if we want to fetch resources like APIs etc. in the future, we would need network access during build time which would either mean disableing the sandbox during build time or not building through nix. If there is any solution I don't have in mind, just suggest it here. While downloading thing upfront through a flake would be possible, it circumvents many features modern SSGs have like image fetching and optimization etc.

    personally I don't really see a reason why we want to make the website reproducible anyway, since this is not software others rely on and the only deployment target is our own webspace. I think a nix-build without the properties of reproduction would suffice, even if that means we have to include measures like disabling the sandbox. I know it is nice to have reproducability, but I conflicts with the idea of short cycled and quick updates and does not really make any sense in our case either. This is not a fault of nix, it is just a case reproducible builds in that manner were not meant for imo. But yes, having the build go through nix somehow would obviously be a good show off especially since this it is the nixos homepage. But I just wanted to mention some roadblocks here.

  3. thilobillerbeck commented on May 24, 2025

    @thilobillerbeck
    Member

    Btw. since issues with sharp etc. have been resolved this can now be built with nix, though since flakes don't support attributes it is not pure in production. If I can find a good solution to circumvent this problem, it also will be pure there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    new-techstack-betaThis tag marks issues with the new tech stack during preview phaseprio:low

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions