diff --git a/hosts/servo/fs.nix b/hosts/servo/fs.nix index 4d210b6f6..57e02d4ee 100644 --- a/hosts/servo/fs.nix +++ b/hosts/servo/fs.nix @@ -35,6 +35,38 @@ fsType = "vfat"; }; + # slow, external storage (for archiving, etc) + fileSystems."/nix/persist/ext" = { + device = "/dev/disk/by-uuid/aa272cff-0fcc-498e-a4cb-0d95fb60631b"; + fsType = "btrfs"; + options = [ + "compress=zstd" + "defaults" + ]; + }; + + sane.impermanence.service-dirs = [ + # TODO: this is overly broad; only need media and share directories to be persisted + { user = "colin"; group = "users"; directory = "/var/lib/uninsane"; } + ]; + # direct these media directories to external storage + environment.persistence."/nix/persist/ext/persist" = { + directories = [ + ({ + user = "colin"; + group = "users"; + mode = "0777"; + directory = "/var/lib/uninsane/media/Videos"; + }) + ({ + user = "colin"; + group = "users"; + mode = "0777"; + directory = "/var/lib/uninsane/media/freeleech"; + }) + ]; + }; + # in-memory compressed RAM (seems to be dynamically sized) # zramSwap = { # enable = true; diff --git a/hosts/servo/services/nginx.nix b/hosts/servo/services/nginx.nix index 0854e3414..792cc4cf6 100644 --- a/hosts/servo/services/nginx.nix +++ b/hosts/servo/services/nginx.nix @@ -341,7 +341,5 @@ in sane.impermanence.service-dirs = [ # TODO: mode? { user = "acme"; group = "acme"; directory = "/var/lib/acme"; } - # TODO: this is overly broad; only need media and share directories to be persisted - { user = "colin"; group = "users"; directory = "/var/lib/uninsane"; } ]; }