| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rsync 3.5.0 opens merge files, including per-directory .rsync-filter
files, walking the path one directory at a time, refusing symlinks that
neither root nor the user running rsync owns, and opening each directory
for reading. It treats the files it can't open that way as missing,
without saying so. That happens, e.g., below a home directory with mode
711, which the user may enter but not read, or behind another user's
symlink. Such a source then got synced without its .rsync-filter rules:
excluded files got transferred, and --delete-excluded deleted nothing.
Before syncing with rsync 3.5.0 or later a source containing .rsync-filter
files, populate asks rsync which of them it reads: a dry run with
--debug=FILTER2. If it reports an existing one as missing, the file
source type's new insecureLinks option decides: with null, the default,
populate fails with an error naming the file; with true, rsync reads such
files anyway (--insecure-links); with false, rsync syncs without them.
Both print a warning.
File scenarios sync a source through a symlink owned by nobody, with each
setting.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With fetchOnTarget, the target fetches the flake's inputs using the
arguments recorded in the lock file, like it does for flake-input
sources. The flake itself has no lock entry, so the target fetches it
by its locked reference, unless that refers to the deploying machine,
e.g. a path or a Git work tree. Then the flake's tree gets transferred
using rsync and added to the target's store using nix-store --add-fixed,
which yields the same store path as on the deploying machine, because
flake store paths are content-addressed by their NAR hash. Adding paths
like this needs neither signatures nor a trusted user, so this works for
targets using sudo. The transfer gets skipped if the target's store has
the flake already, and populate fails if the added path differs from
the expected one.
rsync' gets a filterFiles option, so the flake's tree gets transferred
without applying .rsync-filter files, which would change it.
|
| |
|
|
|
|
|
| |
The flake-input source type delivers an input of a flake, as recorded in the
flake's lock file, and the flake source type delivers the flake itself.
fetchOnTarget belongs to flake-input, because only a locked input can be
fetched on the target.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
For each source that draws inputs from other sources, populate generates a
flake in .populate/flakes/<name>, which re-exports the outputs of the
source's flake with those inputs drawn from the other sources. The source
itself stays as it is, so NIX_PATH still refers to it.
Generated flakes refer to each other's generated flakes, so a source's own
declarations apply wherever it gets drawn from, and get generated in
dependency order. Evaluation fails for sources drawing inputs from missing
sources, from themselves, or from each other. Generated flakes get locked on
every run, and get removed once their sources no longer draw inputs from
other sources.
|
| |
|
|
|
| |
flakeFollows lists the inputs a source draws from other sources, with the
paths of nested inputs flattened.
|
| |
|
|
|
|
|
|
|
|
| |
With fetchOnTarget, the target fetches the input and its own inputs itself,
using fetchTree with the arguments recorded in the flake's lock file. Only
nix flake metadata runs on the deploying machine, so the inputs get
downloaded once, by the target. This needs Nix with flake support on the
target, which populate checks before fetching.
Because nothing gets copied, this also works for targets using sudo.
|
| |
|
|
|
|
| |
Shell code that enables flakes for the Nix commands following it, and fails
with an error message naming the host and the Nix version found, unless Nix
supports flakes.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Deliver a flake, or one of its locked inputs, to the target: archive the
flake locally, copy the selected input together with its own inputs into the
target's store, and link it at the target path, registered as garbage
collector root. The result can be used in NIX_PATH as well as by flakes
evaluated on the target, without network access.
nix copy runs with a separate ssh wrapper without the control socket, because
Nix waits for its LocalCommand, which may not run over a multiplexed
connection.
|
| | |
|
| |
|
|
|
| |
This is the expected behavior.
The SSH config is also implicitly used for other SSH-related settings.
|
| | |
|
| |
|
|
|
| |
This fixes an issue when trying to deploy using sudo from systems that
don't provide means to determine the real host name.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
- Added a new option for `file` sources, which allows to specify a list
of `include` and `exclude` filters
- Added a new option for `file` sources, which allows to disable the
`--delete-excluded` behaviour.
|
| | |
|
| |
|
|
|
|
|
| |
Let ssh use the user configured in its configuration files when the
target user is set to the empty string.
Closes https://github.com/krebs/krops/issues/2
|
| |
|
|
|
|
|
|
| |
This allows deployment of remote hosts without having ssh access to the
root user. Passwordless sudo is recommended since krops will use
multiple ssh sessions and the password will not be remembered.
Closes https://github.com/krebs/krops/issues/3
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|
|
https://cgit.krebsco.de/stockholm 877b4104370c1ea9698a449e376e2842d7c372fd
|