Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remote_store: register for NIX_REMOTE=unix://path #1801

Merged
merged 1 commit into from Jan 31, 2018

Conversation

catern
Copy link
Contributor

@catern catern commented Jan 15, 2018

This allows overriding the socket path so the daemon may be listening at
an arbitrary Unix domain socket location.

Fixes #1800

@@ -145,6 +146,7 @@ private:
};

ref<RemoteStore::Connection> openConnection() override;
std::experimental::optional<std::string> path = std::experimental::nullopt;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The initializer is unnecessary.

@catern catern force-pushed the master branch 2 times, most recently from 0cd8a95 to 722c643 Compare January 19, 2018 02:03
Copy link
Member

@shlevy shlevy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome!

@@ -98,7 +111,12 @@ ref<RemoteStore::Connection> UDSRemoteStore::openConnection()
throw SysError("cannot create Unix domain socket");
closeOnExec(conn->fd.get());

string socketPath = settings.nixDaemonSocketFile;
string socketPath;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: socketPath = path ? *path : settings.nixDaemonSocketFile

This allows overriding the socket path so the daemon may be listening at
an arbitrary Unix domain socket location.

Fixes NixOS#1800
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants