Skip to content

Commit

Permalink
borgmatic: Change type of extraConfigOption to yamlFormat.type
Browse files Browse the repository at this point in the history
There is no reason to specify with a complex expression what has
already been specified by someone smarter.
  • Loading branch information
DamienCassou committed Mar 20, 2023
1 parent 1b8bf5c commit 9e3c2b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/programs/borgmatic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ with lib;
let
cfg = config.programs.borgmatic;

yamlFormat = pkgs.formats.yaml { };

mkNullableOption = args:
lib.mkOption (args // {
type = lib.types.nullOr args.type;
Expand All @@ -20,7 +22,7 @@ let
};

extraConfigOption = mkOption {
type = with types; attrsOf (oneOf [ str bool path int (listOf str) ]);
type = yamlFormat.type;
default = { };
description = "Extra settings.";
};
Expand Down

0 comments on commit 9e3c2b3

Please sign in to comment.