Skip to content

Run Nix worker in slave mode #139

Closed as not planned
Closed as not planned

Description

@rickynils

It would be nice if you could run the Nix worker daemon in slave mode on computer A, where it would delegate all Nix operations to the Nix worker running on another computer B. The Nix store (and maybe the database too) from B should be mounted read-only with NFS, CIFS or VIRTFS/9P on computer A, and no copying of paths should take place.

You can do this today, by just mounting the store from computer B on computer A and then perform all Nix builds on computer B (or even do a hack with socat that tunnels all Nix socket operations from A to B). However, then you can't use nix-build, nix-env or nixos-rebuild properly on computer A. I imagine a Nix slave mode could solve this quite easily.

The use case is to be able to share a Nix store between several computers (saving disk space and keep mutable parts down), but still be able to "local" builds. It is also very useful for virtual machines, where it is particularly nice to share the Nix store with the host instead of filling up disk images.

Activity

  1. stale commented on Feb 15, 2021

    @stale

    I marked this as stale due to inactivity. → More info

  2. Ericson2314 commented on Feb 24, 2021

    @Ericson2314
    Member

    We have NIX_REMOTE=ssh-ng://... for just setting a remote store as the default. I would say the remote store mounting part is quite unrelated to that?

  3. stale commented on Aug 24, 2021

    @stale

    I marked this as stale due to inactivity. → More info

  4. added
    security
    UX
    on Sep 12, 2022
  5. rickynils commented on Aug 31, 2023

    @rickynils
    MemberAuthor

    I think that #7890 (which is being implemented by @mupdt) would more or less fulfill the use case described in this issue. So this 10 year old issue can probably be closed.

  6. removed their assignment
    on Apr 26, 2024
  7. added a commit that references this issue on Jul 25, 2025
  8. added 7 commits that reference this issue on Aug 5, 2026
  9. tomberek commented on Aug 13, 2026

    @tomberek
    Contributor

    Closing as stale. Re-open if needed.

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

    UXfeatureperformancesecurity

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions