1
0
Fork 0

Haven: unlock and mount /backups partition

This commit is contained in:
Aires 2024-05-15 14:10:46 -04:00
parent 655d909416
commit cfe1d8d4df
2 changed files with 12 additions and 13 deletions

View file

@ -218,8 +218,6 @@
]
},
"locked": {
"lastModified": 1715442723,
"narHash": "sha256-pXMH7lqr5bT2FjH/3tEdTT/+1+hKx+15WkcGKycWWSM=",
"lastModified": 1715442723,
"narHash": "sha256-pXMH7lqr5bT2FjH/3tEdTT/+1+hKx+15WkcGKycWWSM=",
"ref": "refs/heads/main",
@ -251,11 +249,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1715528918,
"narHash": "sha256-VvRyabLoTbX69HRiSmgraHqPzz+cfjMJjYxSmBPz0vg=",
"lastModified": 1715529644,
"narHash": "sha256-5zLGr8IDwzVuA6FhpaacAP0MxsUFUbABpF6ZTnJ/KXg=",
"owner": "8bitbuddhist",
"repo": "nixos-hardware",
"rev": "2e28b5160b3fb8a1950a45f65e66fcca06920ac0",
"rev": "a1dc5cd106dd23416447f5776415c00b2581102e",
"type": "github"
},
"original": {
@ -299,11 +297,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1715447595,
"narHash": "sha256-VsVAUQOj/cS1LCOmMjAGeRksXIAdPnFIjCQ0XLkCsT0=",
"lastModified": 1715534503,
"narHash": "sha256-5ZSVkFadZbFP1THataCaSf0JH2cAH3S29hU9rrxTEqk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "062ca2a9370a27a35c524dc82d540e6e9824b652",
"rev": "2057814051972fa1453ddfb0d98badbea9b83c06",
"type": "github"
},
"original": {

View file

@ -10,11 +10,7 @@ fi
# Immediately exit on any errors
set -e
# local storage partition
echo "Unlocking storage partition:"
# 4 TB HDD, partition #2
#cryptsetup luksOpen /dev/disk/by-uuid/8dc60329-d27c-4a4a-b76a-861b1e28400e storage
# RAID 5
cryptsetup luksOpen /dev/md/Sapana storage
@ -23,6 +19,11 @@ if [ ! -f /dev/mapper/storage ]; then
mount /dev/mapper/storage /storage
if [ $? -eq "0" ]; then
echo "Unlocking backup partition:"
# 4 TB HDD, partition #2
cryptsetup luksOpen /dev/disk/by-uuid/8dc60329-d27c-4a4a-b76a-861b1e28400e backups --key-file /storage/backups_partition.key
mount /dev/mapper/backups /backups
echo "Storage and backup partitions mounted."
echo "Starting Duplicacy:"