nixos/borgmatic: use pkgs.formats.yaml
This commit is contained in:
parent
ed185db3df
commit
2ddfd7e81b
@ -4,7 +4,8 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.services.borgmatic;
|
cfg = config.services.borgmatic;
|
||||||
cfgfile = pkgs.writeText "config.yaml" (builtins.toJSON cfg.settings);
|
settingsFormat = pkgs.formats.yaml { };
|
||||||
|
cfgfile = settingsFormat.generate "config.yaml" cfg.settings;
|
||||||
in {
|
in {
|
||||||
options.services.borgmatic = {
|
options.services.borgmatic = {
|
||||||
enable = mkEnableOption "borgmatic";
|
enable = mkEnableOption "borgmatic";
|
||||||
@ -14,7 +15,7 @@ in {
|
|||||||
See https://torsion.org/borgmatic/docs/reference/configuration/
|
See https://torsion.org/borgmatic/docs/reference/configuration/
|
||||||
'';
|
'';
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
freeformType = with lib.types; attrsOf anything;
|
freeformType = settingsFormat.type;
|
||||||
options.location = {
|
options.location = {
|
||||||
source_directories = mkOption {
|
source_directories = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
|
Loading…
Reference in New Issue
Block a user