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:
parent
e019872af8
commit
166d5cc851
1 changed files with 20 additions and 17 deletions
|
@ -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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue