Commit Graph

37 Commits

Author SHA1 Message Date
squalus
5225bb53df remote: add NarFromPath client 2023-12-14 00:49:04 -08:00
squalus
5494cc3edd remote: add AddToStoreNar client 2023-12-12 19:05:07 -08:00
sorki
619687b446 remote: fix flaky collectGarbage for MITM test 2023-12-12 07:09:17 +01:00
sorki
b754f3aa6d remote: NixDaemonSpec, shell -> proc for nix-daemon so it gets terminated 2023-12-10 19:23:23 +01:00
sorki
3eb346699b remote: fix roots test for MITM vs Direct 2023-12-10 18:48:50 +01:00
sorki
dea03e0f72 remote/server: propagate errors from proxy handler 2023-12-10 18:05:59 +01:00
sorki
3d774b8187 remote/server: add proxyNarSource 2023-12-10 18:05:53 +01:00
sorki
3dc7ab6f06 remote: add postGreet so we setStoreDir in Server as well 2023-12-10 17:11:16 +01:00
sorki
4651980047 remote: NixDaemonSpec MITM 2023-12-10 17:11:16 +01:00
sorki
30baaf3db2 remote: NixDaemonSpec pass StoreConnection, StoreDir 2023-12-10 17:11:16 +01:00
sorki
8eb0059576 remote: neaten NixDaemonSpec, silence nix-store and daemon with grep -v 2023-12-10 17:11:16 +01:00
sorki
960407b0a1 remote: add StoreConnection, reclaim runStoreSocket, now greetServer 2023-12-10 17:11:16 +01:00
sorki
7b41967cc8 remote: monadic collapse 2023-12-10 17:11:16 +01:00
sorki
e5c1492a64 remote: tests-io cleanup 2023-12-07 17:57:45 +01:00
sorki
523e490137 remote: port all operations to GADT based ones 2023-12-07 16:35:16 +01:00
sorki
c841f93b69 remote: align GC(Options|Result) record field naming 2023-12-07 16:35:16 +01:00
sorki
e6ed8f8069 single BuildResult to rule them all 2023-12-07 16:35:16 +01:00
sorki
06935815c6 core: makeStorePathName -> mkStorePathName 2023-12-07 16:35:16 +01:00
sorki
a8077c5031 prefix Metadata fields 2023-12-07 16:35:16 +01:00
sorki
b506f1a2d7 remote: use DList Logger
instead of slow-to-append-to list. Thanks for the suggestion!

Closes #63.

Co-Authored-By: Travis Whitaker <pi.boy.travis@gmail.com>
2023-12-07 16:35:16 +01:00
sorki
638ac9ea80 remote: fix dumm(p)y path typo 2023-12-07 16:35:15 +01:00
sorki
8b1db174bc remote: add Types.Query.Missing for QueryMissing result 2023-12-06 16:25:38 +01:00
sorki
cbbc731519 remote: fix mapStoreConfig import 2023-12-06 16:25:38 +01:00
sorki
a3c9530198 remote: heavy lifting
- By layus
  - `RemoteStoreT`, `RemoteStoreState` from #72

- By Ericson2314
  - Reorg, `MonadRemoteStore0`, `MonadRemoteStoreHandshake`,
    `PreStoreConfig`, better `greet`

- By ryantrinkle
  - Correctly detect when other side has hung up, throws
    `RemoteStoreError_Disconnected`

Co-Authored-By: Guillaume Maudoux <layus.on@gmail.com>
Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems>
Co-Authored-By: Ryan Trinkle <ryan@trinkle.org>
2023-12-06 16:25:38 +01:00
sorki
9cd7d3597a remote, add Types.GC, use in deleteSpecific 2023-11-30 06:59:59 +01:00
squalus
922f5bbf8c remote: add deleteSpecific
- add the gcDeleteSpecific action of the CollectGarbage operation.
- add deleteSpecific test
2023-11-30 06:59:59 +01:00
Richard Marko
5ea5b82b59 prefix BuildMode and BuildResult constructors 2023-11-30 06:59:59 +01:00
Richard Marko
4f40e0574a remote: move and rename (CheckFlag|SubstituteFlag) to Types.(Check|Substitude)Mode 2023-11-30 06:59:59 +01:00
Richard Marko
655afaa2f8 remote: squash whitespace 2023-11-30 06:59:59 +01:00
Richard Marko
c7e66bb01f hide StorePath constructor, add unsafeMakeStorePath 2023-11-22 09:50:40 +01:00
Richard Marko
152ce6f8ef add RepairMode to System.Nix.Store.Types 2023-11-22 09:07:14 +01:00
Richard Marko
8ac46de0bd Recursive -> FileIngestionMethod, remove Bools
Actually the same thing, now with prefixed constructors
for extra clarity.

Closes #238
2023-11-22 09:07:14 +01:00
squalus
555e2b7167 remote: fix queryPathInfoUncached narHash decoding
nix-daemon encodes the narHash as Base16, not NixBase32:
https://github.com/NixOS/nix/blob/a6b315ae/src/libstore/worker-protocol.cc#L180

Change the narHash decoding step to use Base16.

Add a test that fails on the previous code with the following error:

    uncaught exception: ErrorCall
    Invalid NixBase32 string
    CallStack (from HasCallStack):

Tested with nix 2.13.6.
2023-11-21 13:51:38 -08:00
Richard Marko
a3d2b20afd remote: prune extensions 2023-11-18 09:22:34 +01:00
Richard Marko
658a566a02 remote: language -> LANGUAGE in pragmas 2023-11-18 09:22:34 +01:00
Richard Marko
319fd00b91 remote: drop relude
I prefer explicit imports vs magic and this causes
an unused packages warning to pop (with no workaround or fix in sight).
2023-11-15 18:36:28 +01:00
Richard Marko
b98fb44d7f remote: rename testsuite to remote-io, move to tests-io 2023-11-15 08:29:49 +01:00