0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

nixos/duplicity: format

This commit is contained in:
Guillaume Girol 2021-04-25 12:00:00 +00:00 committed by Symphorien Gibol
parent e019872af8
commit 166d5cc851

View file

@ -1,16 +1,17 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.duplicity;
stateDirectory = "/var/lib/duplicity";
localTarget = if hasPrefix "file://" cfg.targetUrl
localTarget =
if hasPrefix "file://" cfg.targetUrl
then removePrefix "file://" cfg.targetUrl else null;
in {
in
{
options.services.duplicity = {
enable = mkEnableOption "backups with duplicity";
@ -105,11 +106,13 @@ in {
[
cfg.root
cfg.targetUrl
"--archive-dir" stateDirectory
"--archive-dir"
stateDirectory
]
++ concatMap (p: [ "--include" p ]) cfg.include
++ concatMap (p: [ "--exclude" p ]) cfg.exclude
++ cfg.extraFlags)}
++ cfg.extraFlags
)}
'';
PrivateTmp = true;
ProtectSystem = "strict";