aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
Commit message (Collapse)AuthorAgeFilesLines
* populate: add prunetv48 hours1-0/+17
| | | | | | | | | | | | | | | | | | | Populate never removes what it delivered for sources that aren't configured anymore. For flake and flake-input sources, that keeps their garbage collector roots, so what they delivered never gets collected. With prune, populate removes everything from the target directory that isn't a source, except .populate, after syncing the sources. It also removes the roots in .populate/flake-inputs of names that aren't flake or flake-input sources, and uploads left behind by interrupted runs. Pruning is opt-in, because the target directory may contain other things worth keeping, or be shared by deployments with different sources. writeDeploy, writeTest, and writeCommand pass prune on to populate. A feature scenario deploys sources, deploys fewer without pruning, then with pruning, and checks that the removed sources' entries and roots are gone, while the remaining sources and .populate stay.
* tests: add NixOS VM tests for populatetv2 days1-0/+16
| | | | | | | | | | | | | | | | | tests/default.nix provides one VM test per source type, and one for features spanning sources. Each test runs scenarios from tests/scenarios.nix, which cover every combination of a source type's options, deployed to the deploying machine itself, to a remote target as root, and to a remote target using sudo. A scenario prepares the target directory, deploys, checks the result, and deploys and checks again. Scenarios expecting populate to fail check its error message, or check at evaluation time if populate is expected not to evaluate. The deploying machine creates fixtures using tests/fixtures.sh and serves them via HTTP and git daemon, so flakes can be fetched on the target without further network access. Checks evaluate delivered flakes without network access to the fixtures after collecting garbage, so they verify that the delivered store paths are complete and rooted.
* populate flake: support fetchOnTargettv2 days1-9/+29
| | | | | | | | | | | | | | | | | | 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.
* populate: add flake-input source typetv2 days1-34/+58
| | | | | | | 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.
* krops writeDeploy: add flake parametertv2 days1-0/+10
| | | | | | 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.
* populate: generate flakes for inputs drawn from sourcestv2 days1-0/+64
| | | | | | | | | | | | | | 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.
* populate flake: add fetchOnTargettv2 days1-5/+13
| | | | | | | | | | 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.
* populate: add flake source typetv2 days1-0/+47
| | | | | | | | | | | | 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/+24
|
* Merge pull request #38 from fuu0/patch-1Lassulus2023-04-081-1/+1
|\ | | | | Update README.md to fix broken link with infos to the `target` attribute
| * Update README.mdfuu02023-04-081-1/+1
| | | | | | fix broken link to with infos to the `target` attribute
* | krops writeDeploy: add useNixOutputMonitor parameter1.28.0tv2022-08-231-0/+23
| |
* | Merge remote-tracking branch 'prism/master'1.27.0tv2022-07-261-0/+4
|\ \ | |/ |/|
| * krops writeTest: make trace optionallassulus2022-07-261-0/+4
| |
* | krops writeDeploy: add operation parametertv2022-07-161-2/+6
|/
* populate file: admit derivations1.26.0tv2021-10-261-0/+2
|
* README: transfered -> transferredtv2021-10-261-1/+1
|
* README: talk about systemstv2021-10-261-1/+1
|
* runShell/writeCommand: add allocateTTY argumentlassulus2021-10-261-0/+4
|
* README: use latest krops version in exampleMatthias Beyer2021-10-261-2/+2
| | | | Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
* README: update irc linklassulus2021-07-221-1/+1
|
* README: better usecase for extraOptionslassulus2021-02-161-1/+1
|
* README: ops -> operationstv2021-01-051-1/+1
| | | | Because there's no need to save on characters.
* README: mention github forkJörg Thalheim2020-12-141-1/+2
|
* add `shallow` option to git source typeEnno Lohmeier2020-07-021-0/+4
|
* Merge remote-tracking branch 'krebs/master'tv2020-06-161-2/+58
|\
| * README: document writeTest & writeCommandlassulus2020-05-121-2/+58
| |
* | README: brakets -> bracketstv2020-06-081-1/+1
|/
* README: talk about target.extraOptionstv2020-04-191-4/+11
|
* populate file: deprecated exclude optiontv2020-03-171-11/+6
|
* support for include filtersMilan Pässler2020-02-031-0/+11
| | | | | | | - 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.
* writeDeploy: add crossDeploy argumentJörg Thalheim2019-12-301-0/+11
|
* writeDeploy: add support for build hostsJörg Thalheim2019-12-301-4/+28
| | | | | This allows to evaluate & build the system on the dedicated build host, from which the build artifacts are uploaded onto the target machine.
* populate file: add exclude optionJörg Thalheim2019-12-231-0/+7
|
* README: talk about the target attributev1.18.0tv2019-11-291-1/+32
|
* README: fix minimal examplelassulus2019-11-201-2/+2
|
* README: document all the source typestv2019-02-261-0/+83
|
* populate git: add clean.excludev1.7.0tv2018-10-311-1/+1
|
* README: add communication sectiontv2018-10-051-0/+8
|
* Revert "readme: use builtins.fetchGit to follow master"v1.5.0lassulus2018-10-021-1/+3
| | | | This reverts commit c3af2ddcf24bfed5962d9a3f68a24cd9a746ba1c.
* Merge remote-tracking branch 'ni/master' into HEADlassulus2018-09-291-12/+19
|\
| * README: add link to password storetv2018-09-281-1/+1
| |
| * README: add more words to the example =)tv2018-09-281-10/+11
| |
| * README: add link to palo's blog posttv2018-09-281-0/+4
| |
| * README: fix listtv2018-09-281-0/+1
| |
* | readme: use dummy ip addresslassulus2018-05-031-1/+1
| |
* | readme: add dummy ssh key authorizationlassulus2018-05-031-0/+3
| |
* | readme source: follow nixos-18.03lassulus2018-05-031-2/+2
| |
* | readme: use builtins.fetchGit to follow masterlassulus2018-05-031-4/+2
|/
* update README.mdv1.0.0lassulus2018-05-031-27/+20
|