From eeaf83c8ce782604f0fcb3699fb80b2c775b060c Mon Sep 17 00:00:00 2001 From: fi Date: Wed, 7 Oct 2026 12:55:30 +0200 Subject: [PATCH] Move mastodon database to its own disk --- config/hosts/mastodon/configuration.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/config/hosts/mastodon/configuration.nix b/config/hosts/mastodon/configuration.nix index 6ca384d..f2b6080 100644 --- a/config/hosts/mastodon/configuration.nix +++ b/config/hosts/mastodon/configuration.nix @@ -19,6 +19,11 @@ fsType = "ext4"; autoResize = true; }; + "/mnt/database" = { + device = "/dev/disk/by-label/database"; + fsType = "ext4"; + autoResize = true; + }; "/var/lib/mastodon/public-system" = { depends = [ "/mnt/data" ]; device = "/mnt/data/mastodon"; @@ -26,14 +31,14 @@ options = [ "bind" ]; }; "/var/lib/postgresql" = { - depends = [ "/mnt/data" ]; - device = "/mnt/data/postgresql"; + depends = [ "/mnt/database" ]; + device = "/mnt/database/postgresql"; fsType = "none"; options = [ "bind" ]; }; "/var/lib/private/opensearch/data" = { - depends = [ "/mnt/data" ]; - device = "/mnt/data/opensearch"; + depends = [ "/mnt/database" ]; + device = "/mnt/database/opensearch"; fsType = "none"; options = [ "bind" ]; };