aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* populate: generate flakes for inputs drawn from sourcestv2 days1-0/+27
| | | | | | | | | | | | | | 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.
* lib: add flakeFollowstv47 hours1-0/+14
| | | | | flakeFollows lists the inputs a source draws from other sources, with the paths of nested inputs flattened.
* populate flake: add fetchOnTargettv2 days1-0/+4
| | | | | | | | | | 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.
* lib shell: add requireFlakestv2 days1-0/+14
| | | | | | 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.
* populate: add flake source typetv2 days1-0/+19
| | | | | | | | | | | | 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.
* populate: add passage source type1.29.0tv2024-01-111-0/+26
|
* target: use default port from SSH configErik Arvstedt2021-11-201-2/+6
| | | | | This is the expected behavior. The SSH config is also implicitly used for other SSH-related settings.
* populate file: admit derivations1.26.0tv2021-10-261-2/+6
|
* isLocalTarget: use "localhost" as defaultv1.24.1tv2021-01-161-5/+12
| | | | | This fixes an issue when trying to deploy using sudo from systems that don't provide means to determine the real host name.
* add `shallow` option to git source typeEnno Lohmeier2020-07-021-0/+4
|
* lib: add firstWordtv2020-06-081-0/+3
|
* support default target attrs for attrSetsErik Arvstedt2020-04-181-7/+12
|
* add target.extraOptionsErik Arvstedt2020-04-181-0/+1
|
* populate file: deprecated exclude optiontv2020-03-171-0/+10
|
* support for include filtersMilan Pässler2020-02-031-0/+34
| | | | | | | - 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.
* populate file: add exclude optionJörg Thalheim2019-12-231-0/+5
|
* ssh: support using ssh-configured usertv2019-11-291-1/+1
| | | | | | | 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
* ssh, rsync: support using sudo on remoteMilan Pässler2019-11-291-2/+3
| | | | | | | | 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
* populate git: add fetchAlways optionv1.16.0lassulus2019-08-081-0/+4
|
* populate: add derivation typev1.10.0lassulus2018-12-041-0/+15
|
* populate file: add useChecksumv1.8.0tv2018-11-282-0/+5
|
* populate git: add clean.excludev1.7.0tv2018-10-312-0/+7
|
* lib: add shell.quotetv2018-07-121-0/+10
|
* lib: add isLocalTargettv2018-07-121-0/+6
|
* import stockholm's deployment toolstv2018-02-284-0/+211
https://cgit.krebsco.de/stockholm 877b4104370c1ea9698a449e376e2842d7c372fd