mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
Merge pull request #13277 from zimbatm/flake-archive-no-check-sigs
nix flake archive: add --no-check-sigs option
This commit is contained in:
commit
9ddac1b516
1 changed files with 11 additions and 1 deletions
|
@ -1051,6 +1051,10 @@ struct CmdFlakeArchive : FlakeCommand, MixJSON, MixDryRun
|
||||||
{
|
{
|
||||||
std::string dstUri;
|
std::string dstUri;
|
||||||
|
|
||||||
|
CheckSigsFlag checkSigs = CheckSigs;
|
||||||
|
|
||||||
|
SubstituteFlag substitute = NoSubstitute;
|
||||||
|
|
||||||
CmdFlakeArchive()
|
CmdFlakeArchive()
|
||||||
{
|
{
|
||||||
addFlag({
|
addFlag({
|
||||||
|
@ -1059,6 +1063,11 @@ struct CmdFlakeArchive : FlakeCommand, MixJSON, MixDryRun
|
||||||
.labels = {"store-uri"},
|
.labels = {"store-uri"},
|
||||||
.handler = {&dstUri},
|
.handler = {&dstUri},
|
||||||
});
|
});
|
||||||
|
addFlag({
|
||||||
|
.longName = "no-check-sigs",
|
||||||
|
.description = "Do not require that paths are signed by trusted keys.",
|
||||||
|
.handler = {&checkSigs, NoCheckSigs},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string description() override
|
std::string description() override
|
||||||
|
@ -1122,7 +1131,8 @@ struct CmdFlakeArchive : FlakeCommand, MixJSON, MixDryRun
|
||||||
|
|
||||||
if (!dryRun && !dstUri.empty()) {
|
if (!dryRun && !dstUri.empty()) {
|
||||||
ref<Store> dstStore = dstUri.empty() ? openStore() : openStore(dstUri);
|
ref<Store> dstStore = dstUri.empty() ? openStore() : openStore(dstUri);
|
||||||
copyPaths(*store, *dstStore, sources);
|
|
||||||
|
copyPaths(*store, *dstStore, sources, NoRepair, checkSigs, substitute);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue