From 025c31e7ae3c6823cbd414194468b6040e3fd2d8 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Tue, 1 Sep 2020 23:43:03 +0200 Subject: [PATCH] borg: wip --- configs/workhorse/borg.nix | 14 ++++++++++++++ configs/workhorse/configuration.nix | 1 + configs/workhorse/hardware-configuration.nix | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 configs/workhorse/borg.nix diff --git a/configs/workhorse/borg.nix b/configs/workhorse/borg.nix new file mode 100644 index 0000000..b1a2c6e --- /dev/null +++ b/configs/workhorse/borg.nix @@ -0,0 +1,14 @@ +{ lib, config, pkgs, ... }: { + + services.borgbackup.repos = { + default = { + quota = "100G"; + allowSubRepos = true; + authorizedKeysAppendOnly = [ + # todo rename this one + (toString ) + ]; + }; + }; + +} diff --git a/configs/workhorse/configuration.nix b/configs/workhorse/configuration.nix index ac9935a..4621cc5 100644 --- a/configs/workhorse/configuration.nix +++ b/configs/workhorse/configuration.nix @@ -24,6 +24,7 @@ #./wetten.nix ./nextcloud.nix ./mattermost.nix + ./borg.nix ]; # todo: add this to each file instead summing that here diff --git a/configs/workhorse/hardware-configuration.nix b/configs/workhorse/hardware-configuration.nix index eabf0e3..dce872f 100644 --- a/configs/workhorse/hardware-configuration.nix +++ b/configs/workhorse/hardware-configuration.nix @@ -55,7 +55,7 @@ in { # var/lib/docker # -------------- - fileSystems."/var/lib/docker" = { + fileSystems."/var/lib/borgbackup" = { options = [ "noatime" "nodiratime" ]; device = "/dev/mapper/decrypted_docker"; fsType = "ext4";