Skip to content

With plenty of CPP, build nix daemon on Windows too#15184

Open
Ericson2314 wants to merge 1 commit intoNixOS:masterfrom
obsidiansystems:nix-daemon-windows
Open

With plenty of CPP, build nix daemon on Windows too#15184
Ericson2314 wants to merge 1 commit intoNixOS:masterfrom
obsidiansystems:nix-daemon-windows

Conversation

@Ericson2314
Copy link
Member

Motivation

First commit adds windows support, second commit factors out the functions.

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@Ericson2314 Ericson2314 requested a review from edolstra as a code owner February 9, 2026 22:26
@github-actions github-actions bot added documentation new-cli Relating to the "nix" command labels Feb 9, 2026
@amaanq amaanq force-pushed the nix-daemon-windows branch 3 times, most recently from 0fbb22d to 2d79127 Compare February 10, 2026 00:46
@Ericson2314 Ericson2314 marked this pull request as draft February 10, 2026 15:50
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 10, 2026
This commit extracts the Unix domain socket server loop (`PeerInfo`,
`getPeerInfo`, and the systemd socket activation / poll / accept loop) from
`src/nix/unix/daemon.cc` into a reusable `unix::serveUnixSocket` function in
`libcmd`. Split out from NixOS#15184.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 10, 2026
This commit extracts the Unix domain socket server loop (`PeerInfo`, `getPeerInfo`, and the systemd socket activation / poll / accept loop) from `src/nix/unix/daemon.cc` into a reusable `unix::serveUnixSocket` function in `libcmd`. This is split out from NixOS#15184.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 10, 2026
This commit extracts the Unix domain socket server loop (`PeerInfo`, `getPeerInfo`, and the systemd socket activation / poll / accept loop) from `src/nix/unix/daemon.cc` into a reusable `unix::serveUnixSocket` function in `libcmd`. This is split out from NixOS#15184.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 10, 2026
This commit extracts the Unix domain socket server loop (`PeerInfo`, `getPeerInfo`, and the systemd socket activation / poll / accept loop) from `src/nix/unix/daemon.cc` into a reusable `unix::serveUnixSocket` function in `libcmd`. This is split out from NixOS#15184.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 10, 2026
This commit extracts the Unix domain socket server loop (`PeerInfo`, `getPeerInfo`, and the systemd socket activation / poll / accept loop) from `src/nix/unix/daemon.cc` into a reusable `unix::serveUnixSocket` function in `libcmd`. This is split out from NixOS#15184.
Ericson2314 pushed a commit to obsidiansystems/nix that referenced this pull request Feb 10, 2026
This commit extracts the Unix domain socket server loop (`PeerInfo`, `getPeerInfo`, and the systemd socket activation / poll / accept loop) from `src/nix/unix/daemon.cc` into a reusable `unix::serveUnixSocket` function in `libcmd`. This is split out from NixOS#15184.
@Ericson2314 Ericson2314 changed the title Factor out serveUnixSocket, support on Windows too With plenty of CPP, build nix daemon on Windows too Feb 10, 2026
@Ericson2314 Ericson2314 marked this pull request as ready for review February 10, 2026 17:48
@Ericson2314 Ericson2314 marked this pull request as draft February 10, 2026 17:50
@Ericson2314 Ericson2314 marked this pull request as ready for review February 20, 2026 20:06
Windows does support Unix domain sockets now, somewhat. This isn't very
maintainable, so the next commit will introduce an abstraction that will
be useful for this, and other socket servers.
@Ericson2314
Copy link
Member Author

Ericson2314 commented Feb 26, 2026

Ugh, no std::move_only_function on macOS yet.

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

Labels

documentation new-cli Relating to the "nix" command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant