vanadium: setup systemd mount for seagate drive

This commit is contained in:
Primrose 2025-01-31 15:45:46 +01:00
parent 26399d7220
commit 60b130a65d
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
4 changed files with 39 additions and 9 deletions

View file

@ -1,3 +1,5 @@
{ config, ... }:
{
systemd.tmpfiles.rules = [
@ -24,15 +26,6 @@
];
};
"/mnt/seagate" = {
device = "/dev/disk/by-uuid/acd2fb5c-b976-4bc6-9379-724f4982042c";
fsType = "ext4";
options = [
"noauto"
"user"
];
};
"/home/leana/mnt/tdk32" = {
device = "/dev/disk/by-uuid/EF28-13EC";
fsType = "vfat";
@ -54,4 +47,20 @@
};
};
environment.etc."crypttab".text = ''
seagate /dev/disk/by-uuid/f68b6704-670a-4050-b032-2d553070139a ${config.age.secrets.seagate_pwd.path} noauto
'';
systemd.mounts = [
{
what = "/dev/mapper/seagate";
where = "/mnt/seagate";
requires = [ "systemd-cryptsetup@seagate.service" ];
after = [ "systemd-cryptsetup@seagate.service" ];
unitConfig = {
PropagatesStopTo = [ "systemd-cryptsetup@seagate.service" ];
};
}
];
}