From 038971e4bfd2f9eebb83bf03097846f9f9dc58e6 Mon Sep 17 00:00:00 2001 From: jasmine Date: Tue, 1 Oct 2024 17:35:42 +0800 Subject: [PATCH] setup shares subvolume --- nixos/viridian/hardware-configuration.nix | 6 ++++++ nixos/viridian/services/borgbackup/default.nix | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/nixos/viridian/hardware-configuration.nix b/nixos/viridian/hardware-configuration.nix index 04c9995..8f59566 100644 --- a/nixos/viridian/hardware-configuration.nix +++ b/nixos/viridian/hardware-configuration.nix @@ -77,6 +77,12 @@ in { options = ["subvol=backup" "compress=zstd"]; }; + fileSystems."/srv/shares" = { + device = "/dev/disk/by-label/data"; + fsType = "btrfs"; + options = ["subvol=shares" "compress=zstd"]; + }; + swapDevices = [ { device = "/swap/swapfile"; diff --git a/nixos/viridian/services/borgbackup/default.nix b/nixos/viridian/services/borgbackup/default.nix index bb276cf..d2a226f 100644 --- a/nixos/viridian/services/borgbackup/default.nix +++ b/nixos/viridian/services/borgbackup/default.nix @@ -19,5 +19,15 @@ compression = "auto,zstd"; startAt = "daily"; }; + + shares = { + paths = [ + "/srv/shares" + ]; + encryption.mode = "none"; + repo = "/srv/backup/shares"; + compression = "auto,zstd"; + startAt = "daily"; + }; }; }