diff --git a/modules/btrbk/default.nix b/modules/btrbk/default.nix index fd6258c..ab557a0 100644 --- a/modules/btrbk/default.nix +++ b/modules/btrbk/default.nix @@ -1,4 +1,25 @@ { config, pkgs, ... }: +let + ssd-subvolumes = { + "arch.p1st.de" = {}; + "blogger.privacy1st.de" = {}; + "changedetection.p1st.de" = {}; + "cloud.privacy1st.de" = {}; + "git.privacy1st.de" = {}; + "mastodon-toot-follower.privacy1st.de" = {}; + "money.p1st.de" = {}; + "music.privacy1st.de" = {}; + "paste.p1st.de" = {}; + "proxy" = {}; + "recipe.privacy1st.de" = {}; + "traggo.privacy1st.de" = {}; + }; + hdd-subvolumes = { + "cloud.privacy1st.de" = {}; + # MediaKollektiv: 796 GiB + "cloud.media-kollektiv.eu" = {}; + }; +in { # For each instance, a service and timer will be created: # systemctl list-unit-files | grep btrbk @@ -32,28 +53,11 @@ volume."/jc-data" = { snapshot_dir = "/snap"; - subvolume = { - "arch.p1st.de" = {}; - "blogger.privacy1st.de" = {}; - "changedetection.p1st.de" = {}; - "cloud.privacy1st.de" = {}; - "git.privacy1st.de" = {}; - "mastodon-toot-follower.privacy1st.de" = {}; - "money.p1st.de" = {}; - "music.privacy1st.de" = {}; - "paste.p1st.de" = {}; - "proxy" = {}; - "recipe.privacy1st.de" = {}; - "traggo.privacy1st.de" = {}; - }; + subvolume = ssd-subvolumes; }; volume."/mnt/data/jc-data" = { snapshot_dir = "/mnt/data/snap"; - subvolume = { - "cloud.privacy1st.de" = {}; - # MediaKollektiv: 796 GiB - "cloud.media-kollektiv.eu" = {}; - }; + subvolume = hdd-subvolumes; }; }; }; @@ -77,29 +81,12 @@ volume."/jc-data" = { snapshot_dir = "/snap"; target = "/mnt/backup/snap"; - subvolume = { - "arch.p1st.de" = {}; - "blogger.privacy1st.de" = {}; - "changedetection.p1st.de" = {}; - "cloud.privacy1st.de" = {}; - "git.privacy1st.de" = {}; - "mastodon-toot-follower.privacy1st.de" = {}; - "money.p1st.de" = {}; - "music.privacy1st.de" = {}; - "paste.p1st.de" = {}; - "proxy" = {}; - "recipe.privacy1st.de" = {}; - "traggo.privacy1st.de" = {}; - }; + subvolume = ssd-subvolumes; }; volume."/mnt/data/jc-data" = { snapshot_dir = "/mnt/data/snap"; target = "/mnt/backup/snap2"; - subvolume = { - "cloud.privacy1st.de" = {}; - # MediaKollektiv: 796 GiB - "cloud.media-kollektiv.eu" = {}; - }; + subvolume = hdd-subvolumes; }; }; };