refactor(viridian): migrate service data to dedicated BTRFS subvolumes
Migrate from path-based persistence (/persist/var/lib/*) to dedicated BTRFS subvolumes for better data isolation and snapshot capabilities. - Move valuable user-facing services to /srv/* with srv-* subvolumes: - forgejo: git repositories and database - opengist: paste data - minecraft: game world data - lighttpd: static web content - containers: OCI container volumes - Update home directory to use hm-sajenim subvolume on viridian disk - Remove jupyterhub service (no longer in use) - Update borgbackup paths to match new service locations - Follow upstream service defaults where possible for maintainability Services kept on /persist (disposable state): - traefik, crowdsec, murmur
This commit is contained in:
parent
28ba8186bb
commit
b0bfb37d3c
10 changed files with 64 additions and 94 deletions
|
|
@ -5,6 +5,7 @@
|
|||
config,
|
||||
...
|
||||
}: let
|
||||
hostname = config.networking.hostName;
|
||||
modpack = pkgs.fetchPackwizModpack rec {
|
||||
version = "9083262";
|
||||
url = "https://raw.githubusercontent.com/sajenim/minecraft-modpack/${version}/pack.toml";
|
||||
|
|
@ -71,9 +72,6 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
# Each server will be under a subdirectory named after the server name.
|
||||
dataDir = "/var/lib/minecraft";
|
||||
|
||||
# Open firewall for all servers.
|
||||
openFirewall = true;
|
||||
|
||||
|
|
@ -106,14 +104,12 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
# Enable persistence for the data directory.
|
||||
environment.persistence."/persist" = {
|
||||
directories = [
|
||||
{
|
||||
directory = "/var/lib/minecraft";
|
||||
user = "minecraft";
|
||||
group = "minecraft";
|
||||
}
|
||||
fileSystems."/srv/minecraft" = {
|
||||
device = "/dev/disk/by-label/${hostname}";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"subvol=srv-minecraft"
|
||||
"compress=zstd"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue