change data drive locations and minor backup modifications

This commit is contained in:
Sam 2025-01-22 19:15:53 +00:00
parent 33275e894f
commit acf5706bf6
8 changed files with 37 additions and 15 deletions

View File

@ -17,6 +17,14 @@ in {
]; ];
}; };
services.restic.backups = {
daily = {
paths = [
baseddataData
];
};
};
networking.nat.enable = true; networking.nat.enable = true;
networking.nat.internalInterfaces = ["ve-+"]; networking.nat.internalInterfaces = ["ve-+"];
networking.nat.externalInterface = "br0"; networking.nat.externalInterface = "br0";

View File

@ -23,8 +23,6 @@ in {
paths = [ paths = [
dockerContainerData dockerContainerData
]; ];
exclude = [
];
}; };
}; };

View File

@ -21,8 +21,6 @@ in {
paths = [ paths = [
metricsServerContainerData metricsServerContainerData
]; ];
exclude = [
];
}; };
}; };

View File

@ -10,6 +10,7 @@
containerIp = configVars.networking.addresses.bitcoin-node.ip; containerIp = configVars.networking.addresses.bitcoin-node.ip;
mempoolPort = configVars.networking.addresses.bitcoin-node.services.mempool.port; mempoolPort = configVars.networking.addresses.bitcoin-node.services.mempool.port;
bitcoinNodeContainerData = configVars.locations.bitcoinNodeContainerData; bitcoinNodeContainerData = configVars.locations.bitcoinNodeContainerData;
bitcoindData = configVars.locations.bitcoindData;
gatewayIp = configVars.networking.addresses.gateway.ip; gatewayIp = configVars.networking.addresses.gateway.ip;
allowip = configVars.networking.addresses.bitcoin-node.services.bitcoind.allowip; allowip = configVars.networking.addresses.bitcoin-node.services.bitcoind.allowip;
pubKeys = lib.filesystem.listFilesRecursive ../../users/keys; pubKeys = lib.filesystem.listFilesRecursive ../../users/keys;
@ -19,10 +20,7 @@ in {
daily = { daily = {
paths = [ paths = [
bitcoinNodeContainerData bitcoinNodeContainerData
]; bitcoindData
exclude = [
"${bitcoinNodeContainerData}/bitcoind"
"${bitcoinNodeContainerData}/electrs"
]; ];
}; };
}; };
@ -48,6 +46,10 @@ in {
hostPath = bitcoinNodeContainerData; hostPath = bitcoinNodeContainerData;
isReadOnly = false; isReadOnly = false;
}; };
"/var/lib/bitcoind" = {
hostPath = bitcoindData;
isReadOnly = false;
};
}; };
config = { config = {

View File

@ -21,8 +21,6 @@ in {
paths = [ paths = [
piholeContainerData piholeContainerData
]; ];
exclude = [
];
}; };
}; };

View File

@ -24,6 +24,14 @@ in {
]; ];
}; };
services.restic.backups = {
daily = {
paths = [
semitamapsData
];
};
};
containers."${containerName}" = { containers."${containerName}" = {
enableTun = true; enableTun = true;

View File

@ -12,6 +12,8 @@
btrfsMountDevice = "/dev/disk/by-id/wwn-0x5001b448b5f7cc7f-part2"; btrfsMountDevice = "/dev/disk/by-id/wwn-0x5001b448b5f7cc7f-part2";
impermanence = true; impermanence = true;
homeshareDataLocation = configVars.locations.homeshareDataLocation;
piholeIp = configVars.networking.addresses.pihole.ip; piholeIp = configVars.networking.addresses.pihole.ip;
gatewayIp = configVars.networking.addresses.gateway.ip; gatewayIp = configVars.networking.addresses.gateway.ip;
merlinIp = configVars.networking.addresses.merlin.ip; merlinIp = configVars.networking.addresses.merlin.ip;
@ -110,6 +112,14 @@ in {
]; ];
}; };
services.restic.backups = {
daily = {
paths = [
homeshareDataLocation
];
};
};
# Enable OpenGL # Enable OpenGL
hardware.graphics = { hardware.graphics = {
enable = true; enable = true;

View File

@ -8,16 +8,16 @@
mediaDataMountPoint = "/media/media"; mediaDataMountPoint = "/media/media";
photosDataMountPoint = "/media/photos"; photosDataMountPoint = "/media/photos";
personalDataMountPoint = "/media/personal"; personalDataMountPoint = "/media/personal";
homeshareDataLocation = "/mnt/main-ssd/homeshare"; homeshareDataLocation = "/mnt/main-ssd/homeshare";
metricsServerContainerData = "/mnt/main-ssd/metrics-server"; metricsServerContainerData = "/mnt/main-ssd/metrics-server";
dockerContainerData = "/mnt/main-ssd/docker"; dockerContainerData = "/mnt/main-ssd/docker";
piholeContainerData = "/mnt/main-ssd/docker/pihole"; piholeContainerData = "/mnt/main-ssd/docker/pihole";
bitcoinNodeContainerData = "/mnt/main-ssd/nix-bitcoin";
backupContainerData = "/mnt/main-ssd/backup";
postgresContainerData = "/mnt/main-ssd/postgresql";
semitamapsData = "/mnt/main-ssd/semitamaps-data";
baseddataData = "/mnt/main-ssd/baseddata-data"; baseddataData = "/mnt/main-ssd/baseddata-data";
bitcoinNodeContainerData = "/mnt/main-ssd/nix-bitcoin";
bitcoindData = "/mnt/btcnode/bitcoind";
backupContainerData = "/mnt/deepzfs/backup";
postgresContainerData = "/mnt/nvme-zpool/postgresql";
semitamapsData = "/mnt/nvme-zpool/semitamaps-data";
}; };
} }