| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Populate ends by stopping the ssh master, which fails if no source
started one, e.g. for local targets, which populate doesn't reach via
ssh. Populate then exits with ssh's exit status, though all sources got
delivered. Populate now checks for a master first.
|
| |
|
|
|
|
|
|
| |
Depending on the version of Nix, flake references and lock entries name
the subdirectory containing a flake either as attribute dir or as query
parameter dir of their URL. fetchTree supports neither, so populate
looks for both: it takes the subdirectory from either, from the locked
or the original reference, and removes both before fetching.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
The flake parameter names a source. If the source draws inputs from other
sources, its generated flake gets deployed.
|
| |
|
|
|
|
| |
With flake set, nixos-rebuild deploys that flake from the build target's
source directory, with flakes enabled for the command. The deployment fails
with an error message unless Nix on the build target supports flakes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Each job and the ssh wrapper run as separate scripts, which only see
TMPDIR if it's exported. Without TMPDIR in the caller's environment,
jobs fail, and the ssh wrapper's control socket ends up at the root
directory.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Set TMPDIR to a fresh, private top-level temporary directory, and run each job
in a separate subdirectory beneath it.
TMPDIR remains shared across all jobs, allowing reuse of resources like ssh
control sockets.
|
| | |
|
| |
|
|
| |
Generate a reproducible output to transmit it only if it has changed.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
this fixes folders with symlinks not getting updated if the symlinked
file is in another subfolder of the pass repo
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\ |
|
| | | |
|
| |/ |
|
| | |
|
| | |
|
| |
|
|
|
| |
This is the expected behavior.
The SSH config is also implicitly used for other SSH-related settings.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
In the case we need sudo for the remote target, the flag
`--use-remote-sudo` must be passed if the target's ssh user is not root.
If target's ssh user is root, it doesn't hurt to use sudo.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| | |
support for include filters
|
| | |
| |
| |
| |
| |
| |
| | |
- 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.
|
| |/
|
|
|
| |
This makes the evaluation of krops pure (no import from derivation)
and makes it faster since the fetchGit result might be garbage collected.
|
| | |
|
| |
|
|
|
| |
This allows to evaluate & build the system on the dedicated build host,
from which the build artifacts are uploaded onto the target machine.
|