nixpkgs-suyu/nixos/modules/services/backup
Silvan Mosberger 1d0fc9729d
nixos/treewide: Fix incorrectly rendered examples
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-04-02 07:49:25 +02:00
..
automysqlbackup.nix treewide: Switch to system users 2019-10-12 22:25:28 +02:00
bacula.nix nixos/bacula-sd: add autochange support 2019-12-11 19:16:50 +01:00
borgbackup.nix nixos/borgbackup: install job wrappers to systemPackages for easy borg access 2019-12-26 07:50:03 +02:00
duplicati.nix duplicati: fix StateDirectory 2019-06-27 14:15:37 +02:00
duplicity.nix nixos/duplicity: init 2019-02-03 19:13:01 +01:00
mysql-backup.nix treewide: use attrs instead of list for types.loaOf options 2020-01-06 10:39:18 -05:00
postgresql-backup.nix postgresql-backup: Use saner defaults for pg_dump 2019-12-15 13:14:21 +01:00
postgresql-wal-receiver.nix nixos/postgresql-wal-receiver: remove restart limit (#67857) 2019-09-23 22:51:26 +03:00
restic-rest-server.nix
restic.nix fix pruneCmd to use optionals so multi-element list is preserved 2020-02-07 10:25:33 +00:00
rsnapshot.nix nixos/modules: Remove all usages of types.string 2019-08-31 18:19:00 +02:00
sanoid.nix nixos/sanoid, nixos/syncoid: init module and test 2020-02-10 01:12:39 +01:00
syncoid.nix nixos/treewide: Fix incorrectly rendered examples 2020-04-02 07:49:25 +02:00
tarsnap.nix nixos/treewide: Move rename.nix imports to their respective modules 2019-12-10 02:51:19 +01:00
tsm.nix treewide: remove redundant quotes 2019-08-26 21:40:19 +00:00
zfs-replication.nix treewide: remove redundant quotes 2019-08-26 21:40:19 +00:00
znapzend.nix nixos/znapzend: Increase starting timeout 2019-10-27 12:29:31 +01:00