2023-09-28 21:51:28 -04:00
|
|
|
#pragma once
|
|
|
|
///@file
|
|
|
|
|
|
|
|
#include "types.hh"
|
|
|
|
#include "config.hh"
|
|
|
|
#include "util.hh"
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
#include <limits>
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
namespace nix {
|
|
|
|
|
|
|
|
struct FlakeSettings : public Config
|
|
|
|
{
|
|
|
|
FlakeSettings();
|
|
|
|
|
2024-06-24 13:42:19 -04:00
|
|
|
Setting<bool> useRegistries{
|
|
|
|
this,
|
|
|
|
true,
|
|
|
|
"use-registries",
|
2023-09-28 21:51:28 -04:00
|
|
|
"Whether to use flake registries to resolve flake references.",
|
2024-06-24 13:42:19 -04:00
|
|
|
{},
|
|
|
|
true,
|
|
|
|
Xp::Flakes};
|
|
|
|
|
|
|
|
Setting<bool> acceptFlakeConfig{
|
|
|
|
this,
|
|
|
|
false,
|
|
|
|
"accept-flake-config",
|
2023-09-28 21:51:28 -04:00
|
|
|
"Whether to accept nix configuration from a flake without prompting.",
|
2024-06-24 13:42:19 -04:00
|
|
|
{},
|
|
|
|
true,
|
|
|
|
Xp::Flakes};
|
2023-09-28 21:51:28 -04:00
|
|
|
|
|
|
|
Setting<std::string> commitLockFileSummary{
|
2024-06-24 13:42:19 -04:00
|
|
|
this,
|
|
|
|
"",
|
|
|
|
"commit-lockfile-summary",
|
2023-09-28 21:51:28 -04:00
|
|
|
R"(
|
|
|
|
The commit summary to use when committing changed flake lock files. If
|
|
|
|
empty, the summary is generated based on the action performed.
|
|
|
|
)",
|
2024-06-24 13:42:19 -04:00
|
|
|
{},
|
|
|
|
true,
|
|
|
|
Xp::Flakes};
|
2023-09-28 21:51:28 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
// TODO: don't use a global variable.
|
|
|
|
extern FlakeSettings flakeSettings;
|
|
|
|
|
|
|
|
}
|