Commit graph

15596 commits

Author SHA1 Message Date
Qyriad 580022ed93 split out getDefaultProfileLink() 2024-05-11 17:37:53 -06:00
Qyriad aed917e04d add getDefaultProfileLink()
Change-Id: I38c74da1cf144f50d88ac32eb2afd20388481d06
2024-05-11 17:37:35 -06:00
Qyriad 220b50ad24 WIP: restore /nix/var/nix as source of truth for profiles
See-also: https://github.com/NixOS/nix/pull/5226
Change-Id: I35082c9a59148f7fb132232659c3a254d514d190
2024-05-11 17:37:35 -06:00
Qyriad 42fd3a8042 make profile querying logic more consistent (?)
Change-Id: I00a4a8ba7f3a33aa191383f745f5a1395602e938
2024-05-11 17:37:35 -06:00
Qyriad aaa4138e1d add proper doc comment to getDefaultProfileLink() 2024-05-11 17:21:03 -06:00
Qyriad c9b4ec0280 WIP: restore /nix/var/nix as source of truth for profiles
See-also: https://github.com/NixOS/nix/pull/5226
Change-Id: I35082c9a59148f7fb132232659c3a254d514d190
2024-05-11 17:14:08 -06:00
Qyriad a1de713f96 make profile querying logic more consistent (?)
Change-Id: I00a4a8ba7f3a33aa191383f745f5a1395602e938
2024-05-11 17:07:09 -06:00
Qyriad 9cb9d90c76 split out nix-env stuff 2024-05-11 17:04:55 -06:00
Qyriad 5a3c504f57 WIP: restore /nix/var/nix as source of truth for profiles
See-also: https://github.com/NixOS/nix/pull/5226
Change-Id: I35082c9a59148f7fb132232659c3a254d514d190
2024-05-11 17:04:47 -06:00
Qyriad 0d1fee3d16 make profile querying logic more consistent (?)
Change-Id: I00a4a8ba7f3a33aa191383f745f5a1395602e938
2024-05-11 17:04:47 -06:00
Qyriad f188d21595 i forgot the createDirs part 2024-05-11 16:45:23 -06:00
Qyriad df1280047a WIP: restore /nix/var/nix as source of truth for profiles
See-also: https://github.com/NixOS/nix/pull/5226
Change-Id: I35082c9a59148f7fb132232659c3a254d514d190
2024-05-11 16:45:17 -06:00
Qyriad e39cf83319 fixup createUser 2024-05-11 16:30:50 -06:00
Qyriad 06d96c1ed2 WIP: restore /nix/var/nix as source of truth for profiles
See-also: https://github.com/NixOS/nix/pull/5226
Change-Id: I35082c9a59148f7fb132232659c3a254d514d190
2024-05-11 16:30:45 -06:00
Qyriad ab10423ca5 nixos test must be split 2024-05-11 16:00:23 -06:00
Qyriad 218cdf2c17 WIP: restore /nix/var/nix as source of truth for profiles
See-also: https://github.com/NixOS/nix/pull/5226
Change-Id: I35082c9a59148f7fb132232659c3a254d514d190
2024-05-11 16:00:15 -06:00
Qyriad 66a25796cd warnOnce for MixDefaultProfile 2024-05-11 15:59:53 -06:00
Qyriad 6edbe414a4 WIP: restore /nix/var/nix as source of truth for profiles
See-also: https://github.com/NixOS/nix/pull/5226
Change-Id: I35082c9a59148f7fb132232659c3a254d514d190
2024-05-11 15:59:40 -06:00
Qyriad c95dfadbf1 rebase onto main 2024-05-11 15:40:06 -06:00
Qyriad 88d9b70f67 add clarifying doc-comments on {get,create}NixStateDir()
NixStateDir() != NIX_STATE_DIR. These functions should honestly probably
be renamed.

Change-Id: I00f54b742bba6188bbc7f2410956d956780b99d3
2024-05-11 15:40:00 -06:00
Qyriad 00de4ab5ab WIP: restore /nix/var/nix as source of truth for profiles
See-also: https://github.com/NixOS/nix/pull/5226
Change-Id: I35082c9a59148f7fb132232659c3a254d514d190
2024-05-11 15:40:00 -06:00
Qyriad 726ee27ef4 fixup commit msg for the state dir thing 2024-05-11 15:39:00 -06:00
Qyriad fdb2103358 WIP: restore /nix/var/nix as source of truth for profiles
See-also: https://github.com/NixOS/nix/pull/5226
Change-Id: I35082c9a59148f7fb132232659c3a254d514d190
2024-05-11 15:37:43 -06:00
Qyriad 92e171a38a add clarifying doc-comments on {get,create}NixStateDir()
NixStateDir() != NIX_STATE_DIR. These functions should honestly probably
be renamed.

Change-Id: I00f54b742bba6188bbc7f2410956d956780b99d3
2024-05-11 15:37:43 -06:00
Qyriad 4fb82ea7b5 split out the comment bullshit 2024-05-11 15:37:09 -06:00
Qyriad e63572f540 WIP: restore /nix/var/nix as source of truth for profiles
See-also: https://github.com/NixOS/nix/pull/5226
Change-Id: I35082c9a59148f7fb132232659c3a254d514d190
2024-05-11 15:34:40 -06:00
Qyriad 41b903c5fe add clarifying comments on {get,create}NixStateDir()
Change-Id: I00f54b742bba6188bbc7f2410956d956780b99d3
2024-05-11 15:34:40 -06:00
Qyriad 39fe3c829e squash 2024-05-11 15:30:16 -06:00
Qyriad b46275bdab WIP: restore /nix/var/nix as source of truth for profiles
See-also: https://github.com/NixOS/nix/pull/5226
Change-Id: I35082c9a59148f7fb132232659c3a254d514d190
2024-05-11 15:30:00 -06:00
Qyriad 669410c360 okay cleanup exists 2024-05-11 15:26:53 -06:00
Qyriad cb258d3d8c okay cleanup exists
Change-Id: I972a7f0b4a9bbfa41a794a63f2a28ac776f04b92
2024-05-11 15:26:49 -06:00
Pierre Bourdon a30c567336
filetransfer: unit test content-encoding handling
Very basic behavior test to ensure that gzip data gets internally
decompressed by the file transfer pipeline.

Change a std::string_view return value in the test harness to
std::string. I wouldn't call myself a C++ beginner and I still managed
to shoot myself in the foot like three times with the lifetime
managements there (e.g. [&] { return an_std_string; } ends up with a
dangling string_view!).

Change-Id: I1360750d4181ce1ca2a3aa4dc0e97e131351c469
2024-05-11 15:58:32 +02:00
Pierre Bourdon 38d825b21e
filetransfer: fix decompression regression from 121edecf
121edecf65 added a new state field to
carry over content encoding settings from transfer to sink creation, but
never actually set that field.

Change-Id: I714b2efe745561e851b78a4791479b3501db8c72
2024-05-11 14:49:23 +02:00
Qyriad 389c244572 okay, tests pass 2024-05-10 18:41:16 -06:00
Qyriad 7d1ce1420b okay, tests pass
Change-Id: I2610ed6b3405969d07775e7d72fee9ebfb50cc29
2024-05-10 18:41:07 -06:00
Qyriad d0b654cf76 add sanity test 2024-05-10 17:07:44 -06:00
Qyriad 2955732baa add sanity test
Change-Id: Ie5d378168d5ff1c12abc48c40860da9021ebeb1d
2024-05-10 17:07:39 -06:00
Qyriad f6dc40cd1c Merge "bump the extra --version info from info to notice, -vv -> -v" into main 2024-05-10 21:56:09 +00:00
raito 4ebbd4362f Merge "feat(libstore): print the first line of stdout of SSH in case of failure" into main 2024-05-10 19:33:36 +00:00
raito 8404a1f66d feat(libstore): print the first line of stdout of SSH in case of failure
In case of failure to connect as can be seen in
https://buildbot.lix.systems/#/builders/39/builds/1386/steps/1/logs/stdio

It is difficult to understand what happened, if we enabled the talkative
verbose level, we could learn about the first line SSH sent us.

In practice, this is not workable, we can just make it warn all the
time.

Change-Id: Iaaf56894060a58f2dfc78254bb60b1c43482f9bb
Signed-off-by: Raito Bezarius <raito@lix.systems>
2024-05-10 20:22:47 +02:00
Qyriad 07a230ec73 add --verbose --version commit 2024-05-10 11:59:19 -06:00
Qyriad c5b931c437 put default profile in --verbose --version
Change-Id: Ia9001168d6275284dc54d851c91be51a9dbc3c13
2024-05-10 11:58:53 -06:00
Qyriad d003dcd7f4 bump the extra --version info from info to notice, -vv -> -v
requiring *two* --verbose to print extra information on --version is a
weird flex

Change-Id: I05d043da1bf583f34e9d1fc206144ea4ca9a859d
2024-05-10 11:55:17 -06:00
Qyriad 1085f04018 hopefully more robust 2024-05-10 11:52:20 -06:00
Qyriad 2a79a9e086 split getDefaultProfile() and ensureDefaultProfile()
Change-Id: I5b2820b92423afc3d7036cb2d45ffcafc08af34d
2024-05-10 11:51:46 -06:00
Qyriad e6399a3776 working fucking state 2024-05-09 21:14:36 -06:00
Qyriad 130b2266ba working fucking state
Change-Id: I5b2820b92423afc3d7036cb2d45ffcafc08af34d
2024-05-09 21:14:25 -06:00
eldritch horrors ceccac835c libutil: remove callback.hh
it's no longer used. it really shouldn't have existed this long since it
was just a mashup of both std::promise and std::packaged_task in a shape
that makes composition unnecessarily difficult. all but a single case of
Callback pattern calls were fully synchronous anyway, and even this sole
outlier was by far not important enough to justify the extra complexity.

Change-Id: I208aec4572bf2501cdbd0f331f27d505fca3a62f
2024-05-10 02:21:11 +02:00
eldritch horrors b66451ae7f libstore: de-callback-ify FileTransfer
also add a few more tests for exception propagation behavior. using
packaged_tasks and futures (which only allow a single call to a few
of their methods) introduces error paths that weren't there before.

Change-Id: I42ca5236f156fefec17df972f6e9be45989cf805
2024-05-10 02:21:11 +02:00
Qyriad 5c111af4ba Revert "WIP: restore /nix/var/nix as source of truth for profiles"
This reverts commit fbeef68d63.

this codebase fucking confuses me.
2024-05-09 17:27:09 -06:00