aboutsummaryrefslogtreecommitdiff
path: root/src/nix-daemon
AgeCommit message (Collapse)Author
2018-02-08Add plugins to make Nix more extensible.Shea Levy
All plugins in plugin-files will be dlopened, allowing them to statically construct instances of the various Register* types Nix supports.
2018-02-07More completely fix recursive nix, unbreak testsWill Dietz
See: https://github.com/NixOS/nix/commit/88b5d0c8e89afefbc547b6243c5aa5a3ec8176e9#commitcomment-27406365
2018-02-07Prevent accidental recursive NixEelco Dolstra
2018-01-08Improve error message with --repair for untrusted usersEelco Dolstra
2017-10-24Remove the remote-builds optionEelco Dolstra
This is superfluous since you can now just set "builders" to empty, e.g. "--builders ''".
2017-08-28Give activities a verbosity level againEelco Dolstra
And print them (separately from the progress bar) given sufficient -v flags.
2017-08-28Don't send progress messages to older clientsEelco Dolstra
2017-08-28Tunnel progress messages from the daemon to the clientEelco Dolstra
This makes the progress bar work for non-root users.
2017-08-28Make TunnelLogger thread-safeEelco Dolstra
Now that we use threads in lots of places, it's possible for TunnelLogger::log() to be called asynchronously from other threads than the main loop. So we need to ensure that STDERR_NEXT messages don't clobber other messages.
2017-08-16Progress indicator: CleanupEelco Dolstra
2017-07-30Replace Unicode quotes in user-facing strings by ASCIIJörg Thalheim
Relevant RFC: NixOS/rfcs#4 $ ag -l | xargs sed -i -e "/\"/s/’/'/g;/\"/s/‘/'/g"
2017-07-04Support base-64 hashesEelco Dolstra
Also simplify the Hash API. Fixes #1437.
2017-07-03Replace a few bool flags with enumsEelco Dolstra
Functions like copyClosure() had 3 bool arguments, which creates a severe risk of mixing up arguments. Also, implement copyClosure() using copyPaths().
2017-05-16Improve progress indicatorEelco Dolstra
2017-05-11Don't allow untrusted users to set info.ultimateEelco Dolstra
Note that a trusted signature was still required in this case so it was not a huge deal.
2017-04-28Suppress warning about ssh-auth-sockEelco Dolstra
2017-04-20Setting: Remove "Tag" template argumentEelco Dolstra
2017-04-20Reimplement trusted-substituters (aka trusted-binary-caches)Eelco Dolstra
2017-04-14Minor cleanupEelco Dolstra
2017-04-14nix-daemon: Don't set untrusted-* settingsEelco Dolstra
These are no longer used anywhere.
2017-04-14nix-daemon: Don't die if the user sends an unknown settingEelco Dolstra
2017-04-13Convert Settings to the new config systemEelco Dolstra
This makes all config options self-documenting. Unknown or unparseable config settings and --option flags now cause a warning.
2017-04-13Merge branch 'rework-options' of https://github.com/copumpkin/nixEelco Dolstra
2017-04-06Implement RemoteStore::queryMissing()Eelco Dolstra
This provides a significant speedup, e.g. 64 s -> 12 s for nix-build --dry-run -I nixpkgs=channel:nixos-16.03 '<nixpkgs/nixos/tests/misc.nix>' -A test on a cold local and CloudFront cache. The alternative is to use lots of concurrent daemon connections but that seems wasteful.
2017-04-06nix-daemon: Disable path info cacheEelco Dolstra
This is useless because the client also caches path info, and can cause problems for long-running clients like hydra-queue-runner (i.e. it may return cached info about paths that have been garbage-collected).
2017-03-01TeeSink: Pre-reserve string spaceEelco Dolstra
When receiving a very large file, this can prevent the string from having tobe copied, which temporarily doubles memory consumption.
2017-03-01RemoteStore::addToStore(): Send NAR rather than string containing NAREelco Dolstra
This allows the NAR to be streamed in the future (though we're not doing that yet).
2017-03-01Handle importing NARs containing files greater than 4 GiBEelco Dolstra
Also templatize readInt() to work for various integer types.
2017-02-22Explicitly model all settings and fail on unrecognized onesDan Peebles
Previously, the Settings class allowed other code to query for string properties, which led to a proliferation of code all over the place making up new options without any sort of central registry of valid options. This commit pulls all those options back into the central Settings class and removes the public get() methods, to discourage future abuses like that. Furthermore, because we know the full set of options ahead of time, we now fail loudly if someone enters an unrecognized option, thus preventing subtle typos. With some template fun, we could probably also dump the full set of options (with documentation, defaults, etc.) to the command line, but I'm not doing that yet here.
2017-02-22RemoteStore::addToStore(): Pass content-addressability assertionEelco Dolstra
... and use this in Downloader::downloadCached(). This fixes $ nix-build https://nixos.org/channels/nixos-16.09-small/nixexprs.tar.xz -A hello error: cannot import path ‘/nix/store/csfbp1s60dkgmk9f8g0zk0mwb7hzgabd-nixexprs.tar.xz’ because it lacks a valid signature
2017-02-13nix-daemon: Don't splice with len=SIZE_MAXTuomas Tynkkynen
Currently, 'nix-daemon --stdio' is always failing for me, due to the splice call always failing with (on a 32-bit host): splice(0, NULL, 3, NULL, 4294967295, SPLICE_F_MOVE) = -1 EINVAL (Invalid argument) With a bit of ftracing (and luck) the problem seems to be that splice() always fails with EINVAL if the len cast as ssize_t is negative: http://lxr.free-electrons.com/source/fs/read_write.c?v=4.4#L384 So use SSIZE_MAX instead of SIZE_MAX.
2017-02-07Move SavingSourceAdapter to serialise.hhEelco Dolstra
2016-11-26Revert "Get rid of unicode quotes (#1140)"Eelco Dolstra
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There really is no need for such a massive change...
2016-11-25Get rid of unicode quotes (#1140)Guillaume Maudoux
2016-11-17nix-daemon: Fix splice faking on non-LinuxShea Levy
2016-11-09Merge branch 'ssh-store' of https://github.com/shlevy/nixEelco Dolstra
2016-11-09Implement backwards-compatible RemoteStore::addToStore()Eelco Dolstra
The SSHStore PR adds this functionality to the daemon, but we have to handle the case where the Nix daemon is 1.11. Also, don't require signatures for trusted users. This restores 1.11 behaviour. Fixes https://github.com/NixOS/hydra/issues/398.
2016-10-21Remove addPathToAccessorEelco Dolstra
2016-09-21printMsg(lvlError, ...) -> printError(...) etc.Eelco Dolstra
2016-09-12nix-daemon: Fix error messageShea Levy
2016-09-02Implement nar-based addToStore for remote-storeShea Levy
2016-09-02Add narFromPath op to nix daemonShea Levy
2016-09-02nix-daemon: add --stdio flag for handling connections over stdin/stdoutShea Levy
2016-08-10Mark content-addressed paths in the Nix database and in .narinfoEelco Dolstra
This allows such paths to be imported without signatures.
2016-08-10RemoteStore / nix-daemon: Drop support for Nix < 1.0Eelco Dolstra
2016-07-11Modernize AutoCloseFDShea Levy
2016-06-01Make the store directory a member variable of StoreEelco Dolstra
2016-05-04Cleanup: Remove singleton()Eelco Dolstra
2016-05-04nix-daemon: Fix queryPathInfo() backward compatibilityEelco Dolstra
2016-05-04Remove OpenSSL-based signingEelco Dolstra