about summary refs log tree commit diff
path: root/nixos/modules/services/backup/syncoid.nix
AgeCommit message (Collapse)AuthorFilesLines
2024-04-13nixos: remove all uses of lib.mdDocstuebinm1-21/+21
these changes were generated with nixq 0.0.2, by running nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix two mentions of the mdDoc function remain in nixos/, both of which are inside of comments. Since lib.mdDoc is already defined as just id, this commit is a no-op as far as Nix (and the built manual) is concerned.
2024-01-10nixos/syncoid: add missing ZFS mount permissionWim de With1-1/+1
2023-11-30treewide: replace `mkPackageOptionMD` with `mkPackageOption`h7x41-1/+1
2023-11-22nixos/syncoid: add possibility to use string type for sshKey optionsdatafoo1-6/+2
The sshKey options do not need to be a valid path at build time. Using string instead allow use case when the path is not known at build time such as when using systemd credentials (e.g. `sshKey = "\${CREDENTIALS_DIRECTORY}/zfs-replication_ed25519";`).
2023-11-06syncoid: disable PrivateUsers in systemd unitIvan Petkov1-1/+1
* leaving PrivateUsers=true appears to break when using zfs-2.2.0
2023-03-29(nixos/sanoid, nixos/syncoid): Add package optionsJanet Cobb1-1/+3
Allows changing the sanoid package to be used for these services.
2022-08-31nixos/*: automatically convert option descriptionspennae1-2/+2
conversions were done using https://github.com/pennae/nix-doc-munge using (probably) rev f34e145 running nix-doc-munge nixos/**/*.nix nix-doc-munge --import nixos/**/*.nix the tool ensures that only changes that could affect the generated manual *but don't* are committed, other changes require manual review and are discarded.
2022-08-16syncoid: handle syncing dataset without a parentJörg Thalheim1-16/+18
2022-08-06nixos/*: automatically convert option docspennae1-2/+2
2022-08-05nixos/*: normalize manpage references to single-line formpennae1-2/+1
now nix-doc-munge will not introduce whitespace changes when it replaces manpage references with the MD equivalent. no change to the manpage, changes to the HTML manual are whitespace only.
2022-08-03nixos/*: automatically convert option docs to MDpennae1-1/+1
once again using nix-doc-munge (https://github.com/pennae/nix-doc-munge/commit/69d080323ae27c0d8da3967c62b925a9aedb2828)
2022-08-03nixos/*: replace <replaceable>s with «thing»pennae1-2/+2
we can't embed syntactic annotations of this kind in markdown code blocks without yet another extension. replaceable is rare enough to make this not much worth it, so we'll go with «thing» instead. the module system already uses this format for its placeholder names in attrsOf paths.
2022-07-30treewide: automatically md-convert option descriptionspennae1-32/+32
the conversion procedure is simple: - find all things that look like options, ie calls to either `mkOption` or `lib.mkOption` that take an attrset. remember the attrset as the option - for all options, find a `description` attribute who's value is not a call to `mdDoc` or `lib.mdDoc` - textually convert the entire value of the attribute to MD with a few simple regexes (the set from mdize-module.sh) - if the change produced a change in the manual output, discard - if the change kept the manual unchanged, add some text to the description to make sure we've actually found an option. if the manual changes this time, keep the converted description this procedure converts 80% of nixos options to markdown. around 2000 options remain to be inspected, but most of those fail the "does not change the manual output check": currently the MD conversion process does not faithfully convert docbook tags like <code> and <package>, so any option using such tags will not be converted at all.
2021-10-04nixos/doc: clean up defaults and examplesNaïm Favier1-1/+1
2021-09-27nixos/syncoid: Delegate permissions to parent dataset if target is missingElis Hirwing1-14/+65
This is to address a regression introduced in #131118. When syncing the first dataset, syncoid expects that the target dataset doesn't exist to have a clean slate to work with. So during runtime we'll check if the target dataset does exist and if it doesn't - delegate the permissions to the parent dataset instead. But then, on unallow, we do the unallow on both the target and the parent since the target dataset should have been created at this point, so the unallow can't know which dataset that got permissions just by which datasets exists.
2021-08-16nixos/syncoid: add global and per-dataset permissions optionsmisuzu1-6/+57
2021-07-26nixos/syncoid: Drop ~[at]sync from the systemcallfilter to avoid coredumpsElis Hirwing1-1/+0
2021-07-26nixos/syncoid: Reformat file with nixpkgs-fmtElis Hirwing1-177/+196
2021-07-26nixos/syncoid: Build unallow commands as a post job to drop permissionsElis Hirwing1-9/+15
2021-07-25nixos/syncoid: Extract datasets rather than poolsElis Hirwing1-9/+9
When sending or receiving datasets with the old implementation it wouldn't matter which dataset we were sending or receiving, we would always delegate permissions to the entire pool.
2021-07-24nixos/syncoid: split in multiple systemd servicesJulien Moutinho1-45/+124
2020-11-21nixos/syncoid: fix permissions without --no-sync-snapDaniel Fullmer1-8/+8
After 733acfa140d5b73bc69c53c4ebd90ccc5f281f0e, syncoid would fail to run if commonArgs did not include [ "--no-sync-snap" ], since it would not have permissions to create or destroy snapshots.
2020-10-25Merge pull request #79759 from lopsided98/syncoid-no-rootBenjamin Hipple1-4/+48
nixos/syncoid: automatically setup privilege delegation
2020-04-02nixos/treewide: Fix incorrectly rendered examplesSilvan Mosberger1-1/+5
Many options define their example to be a Nix value without using literalExample. This sometimes gets rendered incorrectly in the manual, causing confusion like in https://github.com/NixOS/nixpkgs/issues/25516 This fixes it by using literalExample for such options. The list of option to fix was determined with this expression: let nixos = import ./nixos { configuration = {}; }; lib = import ./lib; valid = d: { # escapeNixIdentifier from https://github.com/NixOS/nixpkgs/pull/82461 set = lib.all (n: lib.strings.escapeNixIdentifier n == n) (lib.attrNames d) && lib.all (v: valid v) (lib.attrValues d); list = lib.all (v: valid v) d; }.${builtins.typeOf d} or true; optionList = lib.optionAttrSetToDocList nixos.options; in map (opt: { file = lib.elemAt opt.declarations 0; loc = lib.options.showOption opt.loc; }) (lib.filter (opt: if opt ? example then ! valid opt.example else false) optionList) which when evaluated will output all options that use a Nix identifier that would need escaping as an attribute name.
2020-03-09nixos/syncoid: automatically setup privilege delegationBen Wolsieffer1-4/+48
2020-02-10nixos/sanoid, nixos/syncoid: init module and testBen Wolsieffer1-0/+168