mirror of
https://github.com/NixOS/nix
synced 2025-07-07 14:21:48 +02:00
Merge pull request #5504 from NixOS/flake-options-and-daemon
Make the flake options work when using the daemon
This commit is contained in:
commit
736d6ab721
6 changed files with 48 additions and 1 deletions
|
@ -307,7 +307,7 @@ LockedFlake lockFlake(
|
|||
|
||||
if (lockFlags.applyNixConfig) {
|
||||
flake.config.apply();
|
||||
// FIXME: send new config to the daemon.
|
||||
state.store->setOptions();
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
|
@ -290,6 +290,10 @@ ConnectionHandle RemoteStore::getConnection()
|
|||
return ConnectionHandle(connections->get());
|
||||
}
|
||||
|
||||
void RemoteStore::setOptions()
|
||||
{
|
||||
setOptions(*(getConnection().handle));
|
||||
}
|
||||
|
||||
bool RemoteStore::isValidPathUncached(const StorePath & path)
|
||||
{
|
||||
|
|
|
@ -147,6 +147,8 @@ protected:
|
|||
|
||||
virtual void setOptions(Connection & conn);
|
||||
|
||||
void setOptions() override;
|
||||
|
||||
ConnectionHandle getConnection();
|
||||
|
||||
friend struct ConnectionHandle;
|
||||
|
|
|
@ -724,6 +724,11 @@ public:
|
|||
virtual void createUser(const std::string & userName, uid_t userId)
|
||||
{ }
|
||||
|
||||
/*
|
||||
* Synchronises the options of the client with those of the daemon
|
||||
* (a no-op when there’s no daemon)
|
||||
*/
|
||||
virtual void setOptions() { }
|
||||
protected:
|
||||
|
||||
Stats stats;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue